mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-07-19 17:02:15 -07:00
only update recents on successful open
This commit is contained in:
parent
cb293db09a
commit
42a8b4b264
1 changed files with 2 additions and 2 deletions
|
|
@ -162,12 +162,12 @@ void TabDeckStorage::actOpenLocalDeck()
|
||||||
return;
|
return;
|
||||||
QString filePath = localDirModel->filePath(curLeft);
|
QString filePath = localDirModel->filePath(curLeft);
|
||||||
|
|
||||||
SettingsCache::instance().recents().updateRecentlyOpenedDeckPaths(filePath);
|
|
||||||
|
|
||||||
DeckLoader deckLoader;
|
DeckLoader deckLoader;
|
||||||
if (!deckLoader.loadFromFile(filePath, DeckLoader::CockatriceFormat))
|
if (!deckLoader.loadFromFile(filePath, DeckLoader::CockatriceFormat))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
SettingsCache::instance().recents().updateRecentlyOpenedDeckPaths(filePath);
|
||||||
|
|
||||||
emit openDeckEditor(&deckLoader);
|
emit openDeckEditor(&deckLoader);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue