summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--tools/assistant/tools/assistant/mainwindow.cpp13
1 files changed, 11 insertions, 2 deletions
diff --git a/tools/assistant/tools/assistant/mainwindow.cpp b/tools/assistant/tools/assistant/mainwindow.cpp
index cd6cdf1..c1e9027 100644
--- a/tools/assistant/tools/assistant/mainwindow.cpp
+++ b/tools/assistant/tools/assistant/mainwindow.cpp
@@ -228,8 +228,17 @@ MainWindow::MainWindow(CmdLineParser *cmdLine, QWidget *parent)
else if (m_cmdLine->bookmarks() == CmdLineParser::Activate)
showBookmarks();
- if (!m_cmdLine->currentFilter().isEmpty())
- m_helpEngine->setCurrentFilter(m_cmdLine->currentFilter());
+ if (!m_cmdLine->currentFilter().isEmpty()) {
+ const QString &curFilter = m_cmdLine->currentFilter();
+ m_helpEngine->setCurrentFilter(curFilter);
+ int idx = m_filterCombo->findText(curFilter);
+ if (idx >= 0) {
+ bool blocked = m_filterCombo->signalsBlocked();
+ m_filterCombo->blockSignals(true);
+ m_filterCombo->setCurrentIndex(idx);
+ m_filterCombo->blockSignals(blocked);
+ }
+ }
if (usesDefaultCollection())
QTimer::singleShot(0, this, SLOT(lookForNewQtDocumentation()));