forked from qt-creator/qt-creator
QmlDesigner: adding a distinguished context for the form editor
Since Actions like copy/paste and delete interfiere with controls like LineEdit, I added a special context for the form editor. Now copy/paste/delete on the Qml items are only registered for the form editor context and copying the contens of a LineEdit will not lead to copy an item instead, anymore. Reviewed-by: Kai Koehne
This commit is contained in:
@@ -30,6 +30,7 @@
|
||||
#include "designmodewidget.h"
|
||||
#include "qmldesignerconstants.h"
|
||||
#include "styledoutputpaneplaceholder.h"
|
||||
#include "designmodecontext.h"
|
||||
|
||||
#include <model.h>
|
||||
#include <rewriterview.h>
|
||||
@@ -685,6 +686,9 @@ void DesignModeWidget::setup()
|
||||
//### we now own these here
|
||||
rightLayout->addWidget(m_statesEditorWidget.data());
|
||||
|
||||
FormEditorContext *context = new FormEditorContext(m_formEditorView->widget());
|
||||
Core::ICore::instance()->addContextObject(context);
|
||||
|
||||
// editor and output panes
|
||||
m_outputPlaceholderSplitter->addWidget(m_formEditorView->widget());
|
||||
m_outputPlaceholderSplitter->addWidget(m_outputPanePlaceholder);
|
||||
|
||||
Reference in New Issue
Block a user