OSDN Git Service

Analyzer: Make sure right tool is shown when triggered via menu
authorKai Koehne <kai.koehne@nokia.com>
Fri, 23 Sep 2011 15:04:51 +0000 (17:04 +0200)
committerhjk <qthjk@ovi.com>
Fri, 23 Sep 2011 15:10:48 +0000 (17:10 +0200)
Selecting a tool via menu while the Analyze mode is active resulted
in the wrong 'default' tool being selected when the tool finally
forces a switch to Analyze mode. This fixes it by switching to
Analyze mode first -> default tool is shown -> selected tool is shown.

Change-Id: I36e770c932b9c13552dc3604db58837a89d637b6
Reviewed-on: http://codereview.qt-project.org/5466
Reviewed-by: Christiaan Janssen <christiaan.janssen@nokia.com>
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: hjk <qthjk@ovi.com>
src/plugins/analyzerbase/analyzermanager.cpp

index 7d5c9cf..c5cb496 100644 (file)
@@ -639,6 +639,8 @@ void AnalyzerManagerPrivate::selectMenuAction()
     QTC_ASSERT(action, return);
     IAnalyzerTool *tool = m_toolFromAction.value(action);
     StartMode mode = m_modeFromAction.value(action);
+
+    AnalyzerManager::showMode();
     selectTool(tool, mode);
     tool->startTool(mode);
 }