support multi open deck

This commit is contained in:
RickyRister 2024-12-23 01:42:56 -08:00
parent 6e7387ca55
commit 6d1d71795f

View file

@ -242,18 +242,19 @@ void TabDeckStorage::actDeleteLocalDeck()
void TabDeckStorage::actOpenRemoteDeck() void TabDeckStorage::actOpenRemoteDeck()
{ {
RemoteDeckList_TreeModel::FileNode *curRight = for (const auto &curRight : serverDirView->getCurrentSelection()) {
dynamic_cast<RemoteDeckList_TreeModel::FileNode *>(serverDirView->getCurrentItem()); RemoteDeckList_TreeModel::FileNode *node = dynamic_cast<RemoteDeckList_TreeModel::FileNode *>(curRight);
if (!curRight) if (!node)
return; return;
Command_DeckDownload cmd; Command_DeckDownload cmd;
cmd.set_deck_id(curRight->getId()); cmd.set_deck_id(node->getId());
PendingCommand *pend = client->prepareSessionCommand(cmd); PendingCommand *pend = client->prepareSessionCommand(cmd);
connect(pend, SIGNAL(finished(Response, CommandContainer, QVariant)), this, connect(pend, SIGNAL(finished(Response, CommandContainer, QVariant)), this,
SLOT(openRemoteDeckFinished(Response, CommandContainer))); SLOT(openRemoteDeckFinished(Response, CommandContainer)));
client->sendCommand(pend); client->sendCommand(pend);
}
} }
void TabDeckStorage::openRemoteDeckFinished(const Response &r, const CommandContainer &commandContainer) void TabDeckStorage::openRemoteDeckFinished(const Response &r, const CommandContainer &commandContainer)