void ModelToTextMerger::nodeIdChanged(const ModelNode& node, const QString& newId, const QString& oldId) { if (!node.isInHierarchy()) return; schedule(new ChangeIdRewriteAction(node, oldId, newId)); }
void ModelToTextMerger::nodeTypeChanged(const ModelNode &node,const QString &/*type*/, int /*majorVersion*/, int /*minorVersion*/) { if (!node.isInHierarchy()) return; // TODO: handle the majorVersion and the minorVersion schedule(new ChangeTypeRewriteAction(node)); }
void NavigatorView::nodeReparented(const ModelNode &node, const NodeAbstractProperty & /*newPropertyParent*/, const NodeAbstractProperty & /*oldPropertyParent*/, AbstractView::PropertyChangeFlags /*propertyChange*/) { bool blocked = blockSelectionChangedSignal(true); if (m_treeModel->isInTree(node)) m_treeModel->removeSubTree(node); if (node.isInHierarchy()) m_treeModel->addSubTree(node); // make sure selection is in sync again updateItemSelection(); blockSelectionChangedSignal(blocked); }
void NavigatorView::nodeReparented(const ModelNode &node, const NodeAbstractProperty & newPropertyParent, const NodeAbstractProperty & /*oldPropertyParent*/, AbstractView::PropertyChangeFlags /*propertyChange*/) { bool blocked = blockSelectionChangedSignal(true); m_treeModel->removeSubTree(node); if (node.isInHierarchy()) m_treeModel->addSubTree(node); // make sure selection is in sync again updateItemSelection(); if (newPropertyParent.parentModelNode().isValid()) { QModelIndex index = m_treeModel->indexForNode(newPropertyParent.parentModelNode()); treeWidget()->expand(index); } blockSelectionChangedSignal(blocked); }