From 42a8b4b264f67921fddc7be19b32689636403ac9 Mon Sep 17 00:00:00 2001 From: RickyRister Date: Tue, 24 Dec 2024 16:46:18 -0800 Subject: [PATCH] only update recents on successful open --- cockatrice/src/client/tabs/tab_deck_storage.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cockatrice/src/client/tabs/tab_deck_storage.cpp b/cockatrice/src/client/tabs/tab_deck_storage.cpp index 9e9cbc23c..7b2253b5f 100644 --- a/cockatrice/src/client/tabs/tab_deck_storage.cpp +++ b/cockatrice/src/client/tabs/tab_deck_storage.cpp @@ -162,12 +162,12 @@ void TabDeckStorage::actOpenLocalDeck() return; QString filePath = localDirModel->filePath(curLeft); - SettingsCache::instance().recents().updateRecentlyOpenedDeckPaths(filePath); - DeckLoader deckLoader; if (!deckLoader.loadFromFile(filePath, DeckLoader::CockatriceFormat)) return; + SettingsCache::instance().recents().updateRecentlyOpenedDeckPaths(filePath); + emit openDeckEditor(&deckLoader); } }