forked from qt-creator/qt-creator
QmlDesigner: reactivating subcomponent editing
This includes refactoring the DesignDocumentController. In the ComponentTextMoifier I use replaced because it is not blocked by beginEditBlock() of the text cursor. I use the same pattern now for ComponentView like for all the other views. The view is created and controlled by DesignModeWidget because we have only a single instance. Change-Id: I7809b96f52f4d275f0231f3961c3c4bc2618ce89 Reviewed-on: http://codereview.qt.nokia.com/96 Reviewed-by: Marco Bubke <marco.bubke@nokia.com>
This commit is contained in:
committed by
Marco Bubke
parent
e3842f9973
commit
f950b8d7c7
@@ -40,7 +40,8 @@
|
||||
#include <formeditorwidget.h>
|
||||
#include <stateseditorwidget.h>
|
||||
#include <itemlibrarywidget.h>
|
||||
|
||||
#include <componentaction.h>
|
||||
#include <toolbox.h>
|
||||
|
||||
#include <coreplugin/coreconstants.h>
|
||||
#include <coreplugin/modemanager.h>
|
||||
@@ -312,6 +313,7 @@ void DesignModeWidget::showEditor(Core::IEditor *editor)
|
||||
newDocument->setStatesEditorView(m_statesEditorView.data());
|
||||
newDocument->setItemLibraryView(m_itemLibraryView.data());
|
||||
newDocument->setFormEditorView(m_formEditorView.data());
|
||||
newDocument->setComponentView(m_componentView.data());
|
||||
|
||||
|
||||
newDocument->setFileName(fileName);
|
||||
@@ -674,6 +676,8 @@ void DesignModeWidget::setup()
|
||||
|
||||
m_formEditorView = new FormEditorView(this);
|
||||
|
||||
m_componentView = new ComponentView(this);
|
||||
m_formEditorView->widget()->toolBox()->addLeftSideAction(m_componentView->action());
|
||||
m_fakeToolBar = Core::EditorManager::createToolBar(this);
|
||||
|
||||
m_mainSplitter = new MiniSplitter(this);
|
||||
|
||||
Reference in New Issue
Block a user