From 2770b07668cd6fd7554b1f9202d3488e34b3871f Mon Sep 17 00:00:00 2001 From: Brendan Hagan Date: Fri, 30 Dec 2022 22:12:44 -0500 Subject: [PATCH] misc: code formatting + readme update --- CHANGES.md | 2 ++ src/gui/control/gallery_list.cpp | 9 --------- src/gui/control/item_list.cpp | 12 ++++++------ 3 files changed, 8 insertions(+), 15 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index b69babfe..7c94c7c9 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -8,6 +8,8 @@ HEAD: new items added as changes are made Features: Bug fixes: + * Fixed scrolled widgets not scrolling fully (or at all) on Linux (@llemoi, haganbmj#54) + * Fixed crash when 0 keywords match filter string in keyword panel (@llemoi, haganbmj#57) ------------------------------------------------------------------------------ version 2.4.0 (Unofficial), 2022-11-19 diff --git a/src/gui/control/gallery_list.cpp b/src/gui/control/gallery_list.cpp index 4f036bb5..4040dfde 100644 --- a/src/gui/control/gallery_list.cpp +++ b/src/gui/control/gallery_list.cpp @@ -72,15 +72,6 @@ void GalleryList::select(size_t item, size_t subcolumn, bool event) { } void GalleryList::update() { - // ensure selection is visible - /*SubColumn col = subcolumns[active_subcolumn]; - if (col.selection != NO_SELECTION) { - if (itemStart(col.selection) < visible_start) { - scrollTo(itemStart(col.selection), false); - } else if (itemEnd(col.selection) > visibleEnd()) { - scrollTo(itemEnd(col.selection) + visible_start - visibleEnd(), false); - } - }*/ updateScrollbar(); Refresh(false); InvalidateBestSize(); diff --git a/src/gui/control/item_list.cpp b/src/gui/control/item_list.cpp index 4ca36649..83dc0437 100644 --- a/src/gui/control/item_list.cpp +++ b/src/gui/control/item_list.cpp @@ -183,12 +183,12 @@ void ItemList::refreshList(bool refresh_current_only) { if (item_count == 0) { Refresh(); } else { - SetItemCount(item_count); - // (re)select current item - findSelectedItemPos(); - focusNone(); - focusSelectedItem(true); - // refresh items + SetItemCount(item_count); + // (re)select current item + findSelectedItemPos(); + focusNone(); + focusSelectedItem(true); + // refresh items RefreshItems(0, item_count - 1); }