mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-04-27 07:48:01 -07:00
fix deck storage open deck not working at all when folder is in selection (#5333)
This commit is contained in:
parent
c7ca55ceb5
commit
de63066b0b
1 changed files with 4 additions and 4 deletions
|
|
@ -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<RemoteDeckList_TreeModel::FileNode *>(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<RemoteDeckList_TreeModel::FileNode *>(curRight);
|
||||
if (!node)
|
||||
return;
|
||||
continue;
|
||||
|
||||
QString filePath = dirPath + QString("/deck_%1.cod").arg(node->getId());
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue