#15959 closed defect (fixed)

GUI: Close game options deselect the game if grouped by engine in List View

Reported by: criezy Owned by: criezy
Priority: normal Component: GUI
Version: Keywords:
Cc: Game:

Description (last modified by criezy)

In List view grouped by engine, if I select a game, open the game options and click OK, this deselects the game. This does not seem to happen if no grouping or grouping by a different method is used.

More problematic, if I then try to start the game while no game is selected I get a crash.

Assertion failed: (idx < _size), function operator[], file array.h, line 280.

3   __assert_rtn + 284
4   Common::Array<int>::operator[](unsigned int) const + 80 (array.h:280)
5   GUI::GroupedListWidget::getSelected() const + 72 (groupedlist.h:59)
6   GUI::LauncherSimple::getSelected() + 28 (launcher.cpp:1075)
7   GUI::LauncherDialog::handleCommand(GUI::CommandSender*, unsigned int, unsigned int) + 68 (launcher.cpp:758)
8   GUI::LauncherSimple::handleCommand(GUI::CommandSender*, unsigned int, unsigned int) + 780 (launcher.cpp:1336)
9   GUI::CommandSender::sendCommand(unsigned int, unsigned int) + 84 (object.h:54)

This is on macOS Apple Silicon with current master (2.10.git).

Change History (3)

comment:1 by criezy, 15 months ago

Description: modified (diff)

comment:2 by criezy, 14 months ago

In e66a8bc9:

GUI: Fix selecting some items in GroupedListWidget when groups are collapsed

In this case the number of displayed items (the _list) may be smaller
than the total number of items (the _dataList). The index passed to the
function refers to the latter, but the sanity checked compared the index
to the size of the former.

This fixes bug #15959.

comment:3 by lephilousophe, 12 months ago

Owner: set to criezy
Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.