support multi open deck

This commit is contained in:
RickyRister 2024-12-23 00:32:49 -08:00
parent b9c8365009
commit 5aaf1232cb

View file

@ -150,7 +150,8 @@ QString TabDeckStorage::getTargetPath() const
void TabDeckStorage::actOpenLocalDeck() void TabDeckStorage::actOpenLocalDeck()
{ {
QModelIndex curLeft = localDirView->selectionModel()->currentIndex(); QModelIndexList curLefts = localDirView->selectionModel()->selectedRows();
for (const auto &curLeft : curLefts) {
if (localDirModel->isDir(curLeft)) if (localDirModel->isDir(curLeft))
return; return;
QString filePath = localDirModel->filePath(curLeft); QString filePath = localDirModel->filePath(curLeft);
@ -160,6 +161,7 @@ void TabDeckStorage::actOpenLocalDeck()
return; return;
emit openDeckEditor(&deckLoader); emit openDeckEditor(&deckLoader);
}
} }
void TabDeckStorage::actUpload() void TabDeckStorage::actUpload()