Analyzer: Make sure right tool is shown when triggered via menu

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>
This commit is contained in:
Kai Koehne
2011-09-23 17:04:51 +02:00
committed by hjk
parent 1da7d0476e
commit ad9dd78aaa

View 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);
}