mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-07-20 09:22:15 -07:00
support multi open deck
This commit is contained in:
parent
6e7387ca55
commit
6d1d71795f
1 changed files with 11 additions and 10 deletions
|
|
@ -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)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue