mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-07-21 01:42:15 -07:00
only update recents on successful open
This commit is contained in:
parent
09dfc50d28
commit
cb293db09a
1 changed files with 1 additions and 2 deletions
|
|
@ -956,10 +956,9 @@ void TabDeckEditor::openDeckFromFile(const QString &fileName, DeckOpenLocation d
|
||||||
{
|
{
|
||||||
DeckLoader::FileFormat fmt = DeckLoader::getFormatFromName(fileName);
|
DeckLoader::FileFormat fmt = DeckLoader::getFormatFromName(fileName);
|
||||||
|
|
||||||
SettingsCache::instance().recents().updateRecentlyOpenedDeckPaths(fileName);
|
|
||||||
|
|
||||||
auto *l = new DeckLoader;
|
auto *l = new DeckLoader;
|
||||||
if (l->loadFromFile(fileName, fmt)) {
|
if (l->loadFromFile(fileName, fmt)) {
|
||||||
|
SettingsCache::instance().recents().updateRecentlyOpenedDeckPaths(fileName);
|
||||||
if (deckOpenLocation == NEW_TAB) {
|
if (deckOpenLocation == NEW_TAB) {
|
||||||
emit openDeckEditor(l);
|
emit openDeckEditor(l);
|
||||||
} else {
|
} else {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue