aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/debugger/debuggerplugin.cpp
diff options
context:
space:
mode:
authorEike Ziller <[email protected]>2014-07-01 13:20:53 +0200
committerEike Ziller <[email protected]>2014-07-02 09:59:38 +0200
commit8a63420d03c8d7009e49d30c5688b14faa3128b9 (patch)
tree2f4a5942b7c1efdaf01f8ffa732d1f073722b5aa /src/plugins/debugger/debuggerplugin.cpp
parent5b3bb398ba751265aec0fb8071dacc5784985e91 (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.cpp6
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);