OSDN Git Service

Designer: Update editor before entering edit mode.
authorFriedemann Kleint <Friedemann.Kleint@nokia.com>
Mon, 14 Mar 2011 08:42:24 +0000 (09:42 +0100)
committerFriedemann Kleint <Friedemann.Kleint@nokia.com>
Mon, 14 Mar 2011 08:42:24 +0000 (09:42 +0100)
Adapt to changed semantics of ModeManager::currentModeAboutToChange.

Task-number: QTCREATORBUG-4051

src/plugins/designer/formeditorstack.cpp

index 98c44d0..3df5e1f 100644 (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();
 }