mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-29 17:45:32 +00:00
Don't reset the save list when deleting a save (Fixes #3279)
This commit is contained in:
parent
7a962fd8c5
commit
02016f4c56
1 changed files with 11 additions and 8 deletions
|
@ -86,16 +86,19 @@ namespace MWGui
|
|||
{
|
||||
MWBase::Environment::get().getStateManager()->deleteGame (mCurrentCharacter, mCurrentSlot);
|
||||
mSaveList->removeItemAt(mSaveList->getIndexSelected());
|
||||
onSlotSelected(mSaveList, MyGUI::ITEM_NONE);
|
||||
onSlotSelected(mSaveList, mSaveList->getIndexSelected());
|
||||
|
||||
// The character might be deleted now
|
||||
size_t previousIndex = mCharacterSelection->getIndexSelected();
|
||||
open();
|
||||
if (mCharacterSelection->getItemCount())
|
||||
if (mSaveList->getItemCount() == 0)
|
||||
{
|
||||
size_t nextCharacter = std::min(previousIndex, mCharacterSelection->getItemCount()-1);
|
||||
mCharacterSelection->setIndexSelected(nextCharacter);
|
||||
onCharacterSelected(mCharacterSelection, nextCharacter);
|
||||
// The character might be deleted now
|
||||
size_t previousIndex = mCharacterSelection->getIndexSelected();
|
||||
open();
|
||||
if (mCharacterSelection->getItemCount())
|
||||
{
|
||||
size_t nextCharacter = std::min(previousIndex, mCharacterSelection->getItemCount()-1);
|
||||
mCharacterSelection->setIndexSelected(nextCharacter);
|
||||
onCharacterSelected(mCharacterSelection, nextCharacter);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue