forked from qt-creator/qt-creator
Mode: Fix comment regarding contexts
Nowadays all IContext instances of the whole parent hierarchy of the current focus widget are collected. Nevertheless it makes sense to just add the current mode's context. Change-Id: Ia42a693d9b4cd58ac63bb99749b5dfa62f7801aa Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
@@ -311,9 +311,8 @@ void ModeManager::currentTabChanged(int index)
|
|||||||
if (!mode)
|
if (!mode)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// FIXME: This hardcoded context update is required for the Debug and Edit modes, since
|
// Set the mode's context regardless of focus widget.
|
||||||
// they use the editor widget, which is already a context widget so the main window won't
|
// Whenever a mode is active, it's Context is active.
|
||||||
// go further up the parent tree to find the mode context.
|
|
||||||
ICore::updateAdditionalContexts(d->m_addedContexts, mode->context());
|
ICore::updateAdditionalContexts(d->m_addedContexts, mode->context());
|
||||||
d->m_addedContexts = mode->context();
|
d->m_addedContexts = mode->context();
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user