From 0beb88760b4c258b89daf5791069dc885c0c27aa Mon Sep 17 00:00:00 2001 From: Tannin Date: Sun, 19 May 2013 11:36:36 +0200 Subject: - 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 --- src/mainwindow.cpp | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) (limited to 'src/mainwindow.cpp') 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(""); +// QTreeWidgetItem *currentItem = ui->categoriesList->currentItem(); +// QString previousFilter = currentItem != NULL ? currentItem->text(0) : tr(""); + + + QStringList selectedItems; + foreach (QTreeWidgetItem *item, ui->categoriesList->selectedItems()) { + selectedItems.append(item->text(0)); + } + ui->categoriesList->clear(); addFilterItem(NULL, tr(""), CategoryFactory::CATEGORY_SPECIAL_CHECKED); @@ -2315,13 +2322,10 @@ void MainWindow::refreshFilters() addCategoryFilters(NULL, categoriesUsed, 0); - QList 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 matches = ui->categoriesList->findItems(item, Qt::MatchFixedString | Qt::MatchRecursive); + if (matches.size() > 0) { + matches.at(0)->setSelected(true); } } -- cgit v1.3.1