diff options
| author | Tannin <devnull@localhost> | 2013-05-19 11:36:36 +0200 |
|---|---|---|
| committer | Tannin <devnull@localhost> | 2013-05-19 11:36:36 +0200 |
| commit | 0beb88760b4c258b89daf5791069dc885c0c27aa (patch) | |
| tree | e86596d032ef4bc6ba7f2ce5823becd42adcbaca /src/mainwindow.cpp | |
| parent | 4fbfc9aa54ed4499f54eb7b3cd942337f6b49e58 (diff) | |
- added hook for GetModuleFileName
- downloads are now identifiable by ID
- fixed a bug with the multi-select categories list
- fixed a problem with the nexus-login code breaking support for certain passwords
- fixed a bug where detection of archive invalidation didn't work correctly
- fixed ncc plugin trying to handle archives that aren't actually fomods
Diffstat (limited to 'src/mainwindow.cpp')
| -rw-r--r-- | src/mainwindow.cpp | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index 65633ab1..cecf3d7d 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -2290,8 +2290,15 @@ void MainWindow::refreshFilters() ui->modList->setCurrentIndex(QModelIndex()); // save previous filter text so we can restore it later, in case the filter still exists then - QTreeWidgetItem *currentItem = ui->categoriesList->currentItem(); - QString previousFilter = currentItem != NULL ? currentItem->text(0) : tr("<All>"); +// QTreeWidgetItem *currentItem = ui->categoriesList->currentItem(); +// QString previousFilter = currentItem != NULL ? currentItem->text(0) : tr("<All>"); + + + QStringList selectedItems; + foreach (QTreeWidgetItem *item, ui->categoriesList->selectedItems()) { + selectedItems.append(item->text(0)); + } + ui->categoriesList->clear(); addFilterItem(NULL, tr("<Checked>"), CategoryFactory::CATEGORY_SPECIAL_CHECKED); @@ -2315,13 +2322,10 @@ void MainWindow::refreshFilters() addCategoryFilters(NULL, categoriesUsed, 0); - QList<QTreeWidgetItem*> matches = ui->categoriesList->findItems(previousFilter, Qt::MatchFixedString | Qt::MatchRecursive); - if (matches.size() > 0) { - QTreeWidgetItem *currentItem = matches.at(0); - ui->categoriesList->setCurrentItem(currentItem); - while (currentItem != NULL) { - currentItem->setExpanded(true); - currentItem = currentItem->parent(); + foreach (const QString &item, selectedItems) { + QList<QTreeWidgetItem*> matches = ui->categoriesList->findItems(item, Qt::MatchFixedString | Qt::MatchRecursive); + if (matches.size() > 0) { + matches.at(0)->setSelected(true); } } |
