diff options
author | Ken Moore <ken@ixsystems.com> | 2016-11-30 14:07:37 -0500 |
---|---|---|
committer | Ken Moore <ken@ixsystems.com> | 2016-11-30 14:07:37 -0500 |
commit | 6953a388620a15cd2e4d5620b32da5492abff9b9 (patch) | |
tree | 06a732c41cbc626b210a09129ff1a2cc746f55e9 /src-qt5/desktop-utils/lumina-archiver/MainUI.cpp | |
parent | Fix up the permissions of extracted files via lumina-archiver. (diff) | |
download | lumina-6953a388620a15cd2e4d5620b32da5492abff9b9.tar.gz lumina-6953a388620a15cd2e4d5620b32da5492abff9b9.tar.bz2 lumina-6953a388620a15cd2e4d5620b32da5492abff9b9.zip |
Allow for multi-selection of items for extractions.
Diffstat (limited to 'src-qt5/desktop-utils/lumina-archiver/MainUI.cpp')
-rw-r--r-- | src-qt5/desktop-utils/lumina-archiver/MainUI.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src-qt5/desktop-utils/lumina-archiver/MainUI.cpp b/src-qt5/desktop-utils/lumina-archiver/MainUI.cpp index 9d41374c..52831706 100644 --- a/src-qt5/desktop-utils/lumina-archiver/MainUI.cpp +++ b/src-qt5/desktop-utils/lumina-archiver/MainUI.cpp @@ -208,12 +208,16 @@ void MainUI::extractFiles(){ } void MainUI::extractSelection(){ - if(ui->tree_contents->currentItem()==0){ return; } - QString sel = ui->tree_contents->currentItem()->whatsThis(0); + if(ui->tree_contents->currentItem()==0){ return; } //nothing selected + QList<QTreeWidgetItem*> sel = ui->tree_contents->selectedItems(); + if(sel.isEmpty()){ sel << ui->tree_contents->currentItem(); } + QStringList selList; + for(int i=0; i<sel.length(); i++){ selList << sel[i]->whatsThis(0); } + selList.removeDuplicates(); QString dir = QFileDialog::getExistingDirectory(this, tr("Extract Into Directory"), QDir::homePath() ); if(dir.isEmpty()){ return; } ui->label_progress->setText(tr("Extracting...")); - BACKEND->startExtract(dir, true, sel); + BACKEND->startExtract(dir, true, selList); } void MainUI::ViewFile(QTreeWidgetItem *it){ |