mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2024-11-22 14:15:38 +00:00
Fixed an issue where the gamelist would sometimes not reload after media files updates.
This commit is contained in:
parent
90f5d7fad4
commit
c00374419b
|
@ -455,12 +455,21 @@ void GuiMetaDataEd::close()
|
||||||
std::function<void()> closeFunc;
|
std::function<void()> closeFunc;
|
||||||
closeFunc = [this] { delete this; };
|
closeFunc = [this] { delete this; };
|
||||||
|
|
||||||
|
std::function<void()> closeFuncReload;
|
||||||
|
closeFuncReload = [this] {
|
||||||
|
// Always reload the gamelist if media files were updated, even if the user
|
||||||
|
// selected to not save any metadata changes.
|
||||||
|
if (mMediaFilesUpdated)
|
||||||
|
ViewController::get()->reloadGameListView(mScraperParams.system);
|
||||||
|
delete this;
|
||||||
|
};
|
||||||
|
|
||||||
if (metadataUpdated) {
|
if (metadataUpdated) {
|
||||||
// Changes were made, ask if the user wants to save them.
|
// Changes were made, ask if the user wants to save them.
|
||||||
mWindow->pushGui(new GuiMsgBox(mWindow, getHelpStyle(),
|
mWindow->pushGui(new GuiMsgBox(mWindow, getHelpStyle(),
|
||||||
"SAVE CHANGES?",
|
"SAVE CHANGES?",
|
||||||
"YES", [this, closeFunc] { save(); closeFunc(); },
|
"YES", [this, closeFunc] { save(); closeFunc(); },
|
||||||
"NO", closeFunc
|
"NO", closeFuncReload
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|
Loading…
Reference in a new issue