diff options
author | Eike Ziller <[email protected]> | 2014-07-01 13:20:53 +0200 |
---|---|---|
committer | Eike Ziller <[email protected]> | 2014-07-02 09:59:38 +0200 |
commit | 8a63420d03c8d7009e49d30c5688b14faa3128b9 (patch) | |
tree | 2f4a5942b7c1efdaf01f8ffa732d1f073722b5aa /src/plugins/debugger/debuggerplugin.cpp | |
parent | 5b3bb398ba751265aec0fb8071dacc5784985e91 (diff) |
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 <[email protected]>
Diffstat (limited to 'src/plugins/debugger/debuggerplugin.cpp')
-rw-r--r-- | src/plugins/debugger/debuggerplugin.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/plugins/debugger/debuggerplugin.cpp b/src/plugins/debugger/debuggerplugin.cpp index 378461135f9..3b8e2bc3661 100644 --- a/src/plugins/debugger/debuggerplugin.cpp +++ b/src/plugins/debugger/debuggerplugin.cpp @@ -511,7 +511,7 @@ public: DebugMode() { setObjectName(QLatin1String("DebugMode")); - setContext(Context(CC::C_EDITORMANAGER, C_DEBUGMODE, CC::C_NAVIGATION_PANE)); + setContext(Context(C_DEBUGMODE, CC::C_NAVIGATION_PANE)); setDisplayName(DebuggerPlugin::tr("Debug")); setIcon(QIcon(QLatin1String(":/debugger/images/mode_debug.png"))); setPriority(85); @@ -3272,6 +3272,10 @@ void DebuggerPluginPrivate::extensionsInitialized() // Debug mode setup DebugMode *debugMode = new DebugMode; QWidget *widget = m_mainWindow->createContents(debugMode); + Core::IContext *modeContextObject = new Core::IContext(this); + modeContextObject->setContext(Core::Context(CC::C_EDITORMANAGER)); + modeContextObject->setWidget(widget); + Core::ICore::addContextObject(modeContextObject); widget->setFocusProxy(EditorManager::instance()); debugMode->setWidget(widget); |