Fixed an issue where videos would start playing with the menu open after scraping.

This commit is contained in:
Leon Styhre 2020-09-27 12:01:43 +02:00
parent c00374419b
commit 926d730bd2
2 changed files with 8 additions and 2 deletions

View file

@ -453,14 +453,19 @@ void GuiMetaDataEd::close()
// } // }
std::function<void()> closeFunc; std::function<void()> closeFunc;
closeFunc = [this] { delete this; }; closeFunc = [this] {
ViewController::get()->onPauseVideo();
delete this;
};
std::function<void()> closeFuncReload; std::function<void()> closeFuncReload;
closeFuncReload = [this] { closeFuncReload = [this] {
// Always reload the gamelist if media files were updated, even if the user // Always reload the gamelist if media files were updated, even if the user
// selected to not save any metadata changes. // selected to not save any metadata changes.
if (mMediaFilesUpdated) if (mMediaFilesUpdated) {
ViewController::get()->reloadGameListView(mScraperParams.system); ViewController::get()->reloadGameListView(mScraperParams.system);
ViewController::get()->onPauseVideo();
}
delete this; delete this;
}; };

View file

@ -107,6 +107,7 @@ GuiScraperMulti::~GuiScraperMulti()
for (auto it = SystemData::sSystemVector.cbegin(); for (auto it = SystemData::sSystemVector.cbegin();
it !=SystemData::sSystemVector.cend(); it++) it !=SystemData::sSystemVector.cend(); it++)
(*it)->sortSystem(); (*it)->sortSystem();
ViewController::get()->onPauseVideo();
} }
void GuiScraperMulti::onSizeChanged() void GuiScraperMulti::onSizeChanged()