From 8e96359353097cad1453a5c4c6bd2a7d17e1d98c Mon Sep 17 00:00:00 2001 From: tombogle Date: Thu, 16 Nov 2023 06:03:56 -0500 Subject: [PATCH 1/2] Fixed error in BetterGrid.OnCellContentClick so that the delete button works correctly if there is no "new row" --- SIL.Windows.Forms/Widgets/BetterGrid/BetterGrid.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/SIL.Windows.Forms/Widgets/BetterGrid/BetterGrid.cs b/SIL.Windows.Forms/Widgets/BetterGrid/BetterGrid.cs index 861bef0ab..ce0eba299 100644 --- a/SIL.Windows.Forms/Widgets/BetterGrid/BetterGrid.cs +++ b/SIL.Windows.Forms/Widgets/BetterGrid/BetterGrid.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections; using System.Collections.Generic; using System.ComponentModel; @@ -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) From 3e1458c431dc03c5979a7cf95ae3ded400221676 Mon Sep 17 00:00:00 2001 From: tombogle Date: Thu, 16 Nov 2023 14:33:54 -0500 Subject: [PATCH 2/2] Added line to CHANGELOG re: fix to BetterGrid.OnCellContentClick --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index cd2fb6fe4..325b1d569 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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