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/coreplugin/editmode.cpp | |
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/coreplugin/editmode.cpp')
-rw-r--r-- | src/plugins/coreplugin/editmode.cpp | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/plugins/coreplugin/editmode.cpp b/src/plugins/coreplugin/editmode.cpp index 5bffb473e4..412d142535 100644 --- a/src/plugins/coreplugin/editmode.cpp +++ b/src/plugins/coreplugin/editmode.cpp @@ -27,12 +27,13 @@ ** ****************************************************************************/ -#include "editmode.h" #include "coreconstants.h" +#include "editmode.h" +#include "icore.h" #include "modemanager.h" #include "minisplitter.h" -#include "outputpane.h" #include "navigationwidget.h" +#include "outputpane.h" #include "rightpane.h" #include <coreplugin/editormanager/editormanager.h> #include <coreplugin/editormanager/ieditor.h> @@ -85,9 +86,13 @@ EditMode::EditMode() : this, SLOT(grabEditorManager(Core::IMode*))); m_splitter->setFocusProxy(EditorManager::instance()); + IContext *modeContextObject = new IContext(this); + modeContextObject->setContext(Context(Constants::C_EDITORMANAGER)); + modeContextObject->setWidget(m_splitter); + ICore::addContextObject(modeContextObject); + setWidget(m_splitter); setContext(Context(Constants::C_EDIT_MODE, - Constants::C_EDITORMANAGER, Constants::C_NAVIGATION_PANE)); } |