GUI: Retain scroll position when deleting a save

This commit is contained in:
sluicebox 2020-11-17 01:21:18 -08:00 committed by Thierry Crozat
parent fb183011dc
commit 6d3ed4268f

View File

@ -467,7 +467,9 @@ void SaveLoadChooserSimple::handleCommand(CommandSender *sender, uint32 cmd, uin
_metaEngine->removeSaveState(_target.c_str(), _saveList[selItem].getSaveSlot());
setResult(-1);
_list->setSelected(-1);
int scrollPos = _list->getCurrentScrollPos();
_list->setSelected(-1); // resets scroll pos
_list->scrollTo(scrollPos);
updateSaveList();
updateSelection(true);