diff options
author | Eike Ziller <eike.ziller@digia.com> | 2014-07-01 13:20:53 +0200 |
---|---|---|
committer | Eike Ziller <eike.ziller@digia.com> | 2014-07-02 09:59:38 +0200 |
commit | 8a63420d03c8d7009e49d30c5688b14faa3128b9 (patch) | |
tree | 2f4a5942b7c1efdaf01f8ffa732d1f073722b5aa /src/plugins/analyzerbase | |
parent | 5b3bb398ba751265aec0fb8071dacc5784985e91 (diff) | |
download | qt-creator-8a63420d03c8d7009e49d30c5688b14faa3128b9.tar.gz |
Fix that editor actions were enabled when help window is active
The editor manager actions should not be enabled just because the main
window is in edit/debug/analyze mode. Instead the corresponding mode
must have focus.
Otherwise they will be enabled even if extra windows that do not have
editors (like the extra help window, which is e.g. used for
the example documentation) are active.
Change-Id: Id1bf3cc4d1a761ef7ea8a275701f78626ff44533
Reviewed-by: David Schulz <david.schulz@digia.com>
Diffstat (limited to 'src/plugins/analyzerbase')
-rw-r--r-- | src/plugins/analyzerbase/analyzermanager.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/plugins/analyzerbase/analyzermanager.cpp b/src/plugins/analyzerbase/analyzermanager.cpp index 76e8e8d339..92a6b4e9bd 100644 --- a/src/plugins/analyzerbase/analyzermanager.cpp +++ b/src/plugins/analyzerbase/analyzermanager.cpp @@ -98,7 +98,7 @@ public: AnalyzerMode(QObject *parent = 0) : IMode(parent) { - setContext(Context(C_EDITORMANAGER, C_ANALYZEMODE, C_NAVIGATION_PANE)); + setContext(Context(C_ANALYZEMODE, C_NAVIGATION_PANE)); setDisplayName(tr("Analyze")); setIcon(QIcon(QLatin1String(":/images/analyzer_mode.png"))); setPriority(P_MODE_ANALYZE); @@ -279,6 +279,10 @@ void AnalyzerManagerPrivate::delayedInit() splitter->addWidget(mainWindowSplitter); splitter->setStretchFactor(0, 0); splitter->setStretchFactor(1, 1); + Core::IContext *modeContextObject = new Core::IContext(this); + modeContextObject->setContext(Core::Context(Core::Constants::C_EDITORMANAGER)); + modeContextObject->setWidget(splitter); + Core::ICore::addContextObject(modeContextObject); m_mode->setWidget(splitter); AnalyzerPlugin::instance()->addAutoReleasedObject(m_mode); |