1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-02-03 18:15:35 +00:00

Auto-select first save in load dialog

This commit is contained in:
scrawl 2014-05-21 16:36:55 +02:00
parent 3a7e2f8bb5
commit f812746010

View file

@ -256,6 +256,15 @@ namespace MWGui
{
mSaveList->addItem(it->mProfile.mDescription);
}
// When loading, Auto-select the first save, if there is one
if (mSaveList->getItemCount() && !mSaving)
{
mSaveList->setIndexSelected(0);
onSlotSelected(mSaveList, 0);
// Give key focus to save list so we can confirm the selection with Enter
MWBase::Environment::get().getWindowManager()->setKeyFocusWidget(mSaveList);
}
else
onSlotSelected(mSaveList, MyGUI::ITEM_NONE);
}