From de63066b0b2e821dd9648b7b10d0b795220fa162 Mon Sep 17 00:00:00 2001 From: RickyRister <42636155+RickyRister@users.noreply.github.com> Date: Wed, 25 Dec 2024 21:25:30 -0800 Subject: [PATCH] fix deck storage open deck not working at all when folder is in selection (#5333) --- cockatrice/src/client/tabs/tab_deck_storage.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/cockatrice/src/client/tabs/tab_deck_storage.cpp b/cockatrice/src/client/tabs/tab_deck_storage.cpp index 5d57fea55..41800fbe5 100644 --- a/cockatrice/src/client/tabs/tab_deck_storage.cpp +++ b/cockatrice/src/client/tabs/tab_deck_storage.cpp @@ -170,12 +170,12 @@ void TabDeckStorage::actOpenLocalDeck() QModelIndexList curLefts = localDirView->selectionModel()->selectedRows(); for (const auto &curLeft : curLefts) { if (localDirModel->isDir(curLeft)) - return; + continue; QString filePath = localDirModel->filePath(curLeft); DeckLoader deckLoader; if (!deckLoader.loadFromFile(filePath, DeckLoader::CockatriceFormat)) - return; + continue; SettingsCache::instance().recents().updateRecentlyOpenedDeckPaths(filePath); @@ -312,7 +312,7 @@ void TabDeckStorage::actOpenRemoteDeck() for (const auto &curRight : serverDirView->getCurrentSelection()) { RemoteDeckList_TreeModel::FileNode *node = dynamic_cast(curRight); if (!node) - return; + continue; Command_DeckDownload cmd; cmd.set_deck_id(node->getId()); @@ -354,7 +354,7 @@ void TabDeckStorage::actDownload() for (const auto &curRight : serverDirView->getCurrentSelection()) { RemoteDeckList_TreeModel::FileNode *node = dynamic_cast(curRight); if (!node) - return; + continue; QString filePath = dirPath + QString("/deck_%1.cod").arg(node->getId());