[Scummvm-tracker] [ScummVM :: Bugs] #16698: GUI: Search result in launcher list view may appear empty
ScummVM :: Bugs
trac at scummvm.org
Wed Apr 29 07:26:09 UTC 2026
#16698: GUI: Search result in launcher list view may appear empty
-------------------------+---------------------
Reporter: eriktorbjorn | Owner: (none)
Type: defect | Status: new
Priority: normal | Component: GUI
Version: | Resolution:
Keywords: | Game:
-------------------------+---------------------
Comment (by eriktorbjorn):
Resetting `_scrollPos` in `GroupedListWidget::setFilter()` seems to work,
and in that case it should presumably be done in `ListWidget::setFilter()`
too. I don't know if it's the correct fix, but it seems consistent with
`GridView::setFilter()`.
{{{
diff --git a/gui/widgets/groupedlist.cpp b/gui/widgets/groupedlist.cpp
index 28147a65546..7f1c2c4b3e8 100644
--- a/gui/widgets/groupedlist.cpp
+++ b/gui/widgets/groupedlist.cpp
@@ -572,6 +572,7 @@ void GroupedListWidget::setFilter(const
Common::U32String &filter, bool redraw)
}
_currentPos = 0;
+ _scrollPos = 0.0f;
_selectedItem = -1;
// Try to preserve the previous selection
if (selectedItem != -1)
diff --git a/gui/widgets/list.cpp b/gui/widgets/list.cpp
index 7a3559c4498..ffb5a116e99 100644
--- a/gui/widgets/list.cpp
+++ b/gui/widgets/list.cpp
@@ -1126,6 +1126,7 @@ void ListWidget::setFilter(const Common::U32String
&filter, bool redraw) {
}
_currentPos = 0;
+ _scrollPos = 0.0f;
_selectedItem = -1;
if (redraw) {
}}}
--
Ticket URL: <https://bugs.scummvm.org/ticket/16698#comment:1>
ScummVM :: Bugs <https://bugs.scummvm.org>
ScummVM
More information about the Scummvm-tracker
mailing list