forked from qt-creator/qt-creator
Design mode/Qt Designer: clean-up Part II: Fix undo.
Re-introduce FormEditorFile that delegates dirty handling to the form window. Change DesignerXmlEditable to be an IEditor that embeds TextEditable so that the PlainTextEditor can work with it, but delegates relevant functionality to FormEditorFile. Centralize all form window creation code that was scattered around in FormEditorW::createEditor() and have that return a struct Editor data, which is passed to FormEditorStack. Update the text editor only on open/createNew/switch away from design mode.
This commit is contained in:
@@ -92,9 +92,9 @@ QDockWidget* const* EditorWidget::designerDockWidgets() const
|
||||
return m_designerDockWidgets;
|
||||
}
|
||||
|
||||
Designer::FormWindowEditor *EditorWidget::createFormWindowEditor(DesignerXmlEditorEditable *xmlEditor)
|
||||
void EditorWidget::add(const EditorData &d)
|
||||
{
|
||||
return m_stack->createFormWindowEditor(xmlEditor);
|
||||
m_stack->add(d);
|
||||
}
|
||||
|
||||
bool EditorWidget::removeFormWindowEditor(Core::IEditor *xmlEditor)
|
||||
|
||||
Reference in New Issue
Block a user