Skip to content

Commit

Permalink
Merge pull request #1307 from sillsdev/fix-error-in-better-grid
Browse files Browse the repository at this point in the history
Fixed error in BetterGrid.OnCellContentClick
  • Loading branch information
tombogle authored Nov 16, 2023
2 parents 5241079 + 3e1458c commit ffd6e09
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
- [SIL.Windows.Forms] Spelling of `CreativeCommonsLicense.IntergovernmentalOrganizationQualifier`
- [SIL.Windows.Forms] Fixed internationalization problem: SettingsProtection.LauncherButtonLabel was used as ID for two different strings.
- [SIL.Windows.Forms] Fix 4 img metadata methods that could fail due to cloud or scanning interference
- [SIL.Windows.Forms] Fixed error in BetterGrid.OnCellContentClick to make it so the delete button works correctly if there is no "new row."

### Removed

Expand Down
4 changes: 2 additions & 2 deletions SIL.Windows.Forms/Widgets/BetterGrid/BetterGrid.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using System;
using System;
using System.Collections;
using System.Collections.Generic;
using System.ComponentModel;
Expand Down Expand Up @@ -600,7 +600,7 @@ protected override void OnCellContentClick(DataGridViewCellEventArgs e)
CommitEdit(DataGridViewDataErrorContexts.Commit);
EndEdit();
}
else if (e.RowIndex < NewRowIndex && RemoveRowAction != null && IsRemoveRowColumn(e.ColumnIndex))
else if (e.RowIndex < RowCountLessNewRow && RemoveRowAction != null && IsRemoveRowColumn(e.ColumnIndex))
{
RemoveRowAction(e.RowIndex);
if (VirtualMode)
Expand Down

0 comments on commit ffd6e09

Please sign in to comment.