Designer: Update editor before entering edit mode.

Adapt to changed semantics of ModeManager::currentModeAboutToChange.

Task-number: QTCREATORBUG-4051
This commit is contained in:
Friedemann Kleint
2011-03-14 09:42:24 +01:00
parent 575179822c
commit e0279c7403

View File

@@ -186,8 +186,8 @@ void FormEditorStack::modeAboutToChange(Core::IMode *m)
if (Designer::Constants::Internal::debug && m)
qDebug() << "FormEditorStack::modeAboutToChange" << m->id();
// Sync the editor when leaving design mode
if (m && m->id() == QLatin1String(Core::Constants::MODE_DESIGN))
// Sync the editor when entering edit mode
if (m && m->id() == QLatin1String(Core::Constants::MODE_EDIT))
foreach(const EditorData &data, m_formEditors)
data.formWindowEditor->syncXmlEditor();
}