Commit 63ad7ecd authored by Marco Bubke's avatar Marco Bubke

QmlDesigner.NodeInstances: Blocking updates not needed anymore

parent 69265615
......@@ -43,8 +43,6 @@ public:
virtual void addImport(const AddImportCommand &command) = 0;
virtual void completeComponent(const CompleteComponentCommand &command) = 0;
virtual void setBlockUpdates(bool /*block*/) {}
static void registerCommands();
};
......
......@@ -112,8 +112,6 @@ public:
QRectF sceneRect() const;
void setBlockUpdates(bool block);
NodeInstance activeStateInstance() const;
void activateState(const NodeInstance &instance);
......
......@@ -103,11 +103,6 @@ NodeInstanceClientInterface *NodeInstanceServerProxy::nodeInstanceClient() const
return m_nodeInstanceView.data();
}
void NodeInstanceServerProxy::setBlockUpdates(bool block)
{
m_socket->blockSignals(block);
}
void NodeInstanceServerProxy::writeCommand(const QVariant &command)
{
Q_ASSERT(m_socket.data());
......
......@@ -39,8 +39,6 @@ public:
void addImport(const AddImportCommand &command);
void completeComponent(const CompleteComponentCommand &command);
void setBlockUpdates(bool block);
protected:
void writeCommand(const QVariant &command);
void dispatchCommand(const QVariant &command);
......
......@@ -142,11 +142,7 @@ void NodeInstanceView::modelAttached(Model *model)
m_nodeInstanceServer = new NodeInstanceServerProxy(this);
connect(m_nodeInstanceServer.data(), SIGNAL(processCrashed()), this, SLOT(restartProcess()));
setBlockUpdates(true);
nodeInstanceServer()->createScene(createCreateSceneCommand());
setBlockUpdates(false);
}
void NodeInstanceView::modelAboutToBeDetached(Model * model)
......@@ -160,8 +156,6 @@ void NodeInstanceView::modelAboutToBeDetached(Model * model)
void NodeInstanceView::restartProcess()
{
setBlockUpdates(true);
if (model()) {
delete nodeInstanceServer();
......@@ -170,8 +164,6 @@ void NodeInstanceView::restartProcess()
nodeInstanceServer()->createScene(createCreateSceneCommand());
}
setBlockUpdates(false);
}
/*! \brief Notifing the view that a node was created.
......@@ -556,18 +548,6 @@ void NodeInstanceView::removeInstanceNodeRelationship(const ModelNode &node)
instance.makeInvalid();
}
void NodeInstanceView::setBlockUpdates(bool block)
{
if (m_blockUpdates == 0 && block == true)
m_nodeInstanceServer->setBlockUpdates(true);
if (block) {
m_blockUpdates++;
} else if (m_blockUpdates > 0) {
m_blockUpdates--;
}
}
void NodeInstanceView::setStateInstance(const NodeInstance &stateInstance)
{
m_activeStateInstance = stateInstance;
......
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