diff --git a/cockatrice/src/client/tabs/tab_deck_storage.cpp b/cockatrice/src/client/tabs/tab_deck_storage.cpp index 8ab91e2be..d809b1f45 100644 --- a/cockatrice/src/client/tabs/tab_deck_storage.cpp +++ b/cockatrice/src/client/tabs/tab_deck_storage.cpp @@ -242,18 +242,19 @@ void TabDeckStorage::actDeleteLocalDeck() void TabDeckStorage::actOpenRemoteDeck() { - RemoteDeckList_TreeModel::FileNode *curRight = - dynamic_cast(serverDirView->getCurrentItem()); - if (!curRight) - return; + for (const auto &curRight : serverDirView->getCurrentSelection()) { + RemoteDeckList_TreeModel::FileNode *node = dynamic_cast(curRight); + if (!node) + return; - Command_DeckDownload cmd; - cmd.set_deck_id(curRight->getId()); + Command_DeckDownload cmd; + cmd.set_deck_id(node->getId()); - PendingCommand *pend = client->prepareSessionCommand(cmd); - connect(pend, SIGNAL(finished(Response, CommandContainer, QVariant)), this, - SLOT(openRemoteDeckFinished(Response, CommandContainer))); - client->sendCommand(pend); + PendingCommand *pend = client->prepareSessionCommand(cmd); + connect(pend, SIGNAL(finished(Response, CommandContainer, QVariant)), this, + SLOT(openRemoteDeckFinished(Response, CommandContainer))); + client->sendCommand(pend); + } } void TabDeckStorage::openRemoteDeckFinished(const Response &r, const CommandContainer &commandContainer)