Fix initial layout in analyze mode.

Task-number: QTCREATORBUG-5414

Change-Id: I4ac8d150f20e35a769e6f7f13db420d81e93e7e2
Reviewed-on: http://codereview.qt.nokia.com/1552
Reviewed-by: hjk <qthjk@ovi.com>
This commit is contained in:
Eike Ziller
2011-07-13 09:27:25 +02:00
parent 85bdf3ece3
commit d7c2c23da8
3 changed files with 16 additions and 1 deletions

View File

@@ -616,9 +616,15 @@ void AnalyzerManagerPrivate::selectSavedTool()
StartMode mode = m_modeFromAction.value(action);
if (tool->actionId(mode) == lastActiveAction) {
selectTool(tool, mode);
break;
return;
}
}
// fallback to first available tool
if (!m_actions.isEmpty()) {
IAnalyzerTool *tool = m_toolFromAction.value(m_actions.first());
StartMode mode = m_modeFromAction.value(m_actions.first());
selectTool(tool, mode);
}
}
void AnalyzerManagerPrivate::selectMenuAction()
@@ -727,6 +733,8 @@ void AnalyzerManagerPrivate::loadToolSettings(IAnalyzerTool *tool)
settings->beginGroup(QLatin1String("AnalyzerViewSettings_") + tool->id());
if (settings->value("ToolSettingsSaved", false).toBool())
m_mainWindow->restoreSettings(settings);
else
m_mainWindow->restoreSettings(m_defaultSettings.value(tool));
settings->endGroup();
}