Commit bc0303e1 authored by Thomas Hartmann's avatar Thomas Hartmann
Browse files

QmlDesigner.documentcontroller: detach node instance view in edit mode

This patch detaches the node instance view in edit node.
parent 059859b5
......@@ -151,6 +151,19 @@ Model *DesignDocumentController::masterModel() const
return m_d->masterModel.data();
}
void DesignDocumentController::detachNodeInstanceView()
{
if (m_d->nodeInstanceView)
model()->detachView(m_d->nodeInstanceView.data());
}
void DesignDocumentController::attachNodeInstanceView()
{
if (m_d->nodeInstanceView)
model()->attachView(m_d->nodeInstanceView.data());
}
QWidget *DesignDocumentController::centralWidget() const
{
return qobject_cast<QWidget*>(parent());
......@@ -180,8 +193,10 @@ void DesignDocumentController::blockModelSync(bool block)
if (m_d->textModifier) {
if (m_d->syncBlocked) {
detachNodeInstanceView();
m_d->textModifier->deactivateChangeSignals();
} else {
attachNodeInstanceView();
m_d->textModifier->reactivateChangeSignals();
}
}
......
......@@ -133,6 +133,8 @@ private slots:
void changeCurrentModelTo(const ModelNode &node);
private:
void detachNodeInstanceView();
void attachNodeInstanceView();
QWidget *centralWidget() const;
class DesignDocumentControllerPrivate *m_d;
bool save(QIODevice *device, QString *errorMessage);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment