diff --git a/BinxelviewForm.cs b/BinxelviewForm.cs index ea676cb..3ac3e24 100644 --- a/BinxelviewForm.cs +++ b/BinxelviewForm.cs @@ -1583,8 +1583,9 @@ void redrawPreset() r.Cells[2].Style.ForeColor = SystemColors.MenuHighlight; dataGridPixel.Rows.Add(r); } + // If new BPP has fewer entries, the scroll position might be invalid. The grid is large enough to show 8 entries. + if ((old_scroll + 8) >= dataGridPixel.Rows.Count) old_scroll = dataGridPixel.Rows.Count - 8; if (old_scroll < 0) old_scroll = 0; - //if (old_scroll >= dataGridPixel.Rows.Count) old_scroll = 0; dataGridPixel.FirstDisplayedScrollingRowIndex = old_scroll; dataGridPixel.Enabled = !preset.chunky; diff --git a/readme.txt b/readme.txt index ddd78f4..5ca8094 100644 --- a/readme.txt +++ b/readme.txt @@ -279,8 +279,9 @@ Changes 1.6.3.0 (unreleased beta) - Fix relative INI path edge case, when the target directory has a similar name to the INI directory. -- Fix intermittent crash bug when changing presets (re-entrant code). +- Fix inefficient UI updates which were accidentally recursive. - Fix PixelView not updating scroll position on first open. +- Fix crash bug when lowering BPP and bit ordering grid was scrolled down too far. 1.6.2.0 (2024-10-13) - Option persistence, INI file save and load.