void DesignDocument::changeToSubComponentAndPushOnCrumblePath(const ModelNode &componentNode) { if (QmlDesignerPlugin::instance()->currentDesignDocument() != this) return; changeToSubComponent(componentNode); QmlDesignerPlugin::instance()->viewManager().pushInFileComponentOnCrambleBar(componentNode.id()); }
void DesignDocumentController::changeCurrentModelTo(const ModelNode &node) { if (d->componentNode == node) return; if (Internal::DesignModeWidget::instance()->currentDesignDocumentController() != this) return; DesignDocumentControllerPrivate::clearCrumblePath = false; while (d->formEditorView->crumblePath()->dataForLastIndex().value<CrumbleBarInfo>().modelNode.isValid() && !d->formEditorView->crumblePath()->dataForLastIndex().value<CrumbleBarInfo>().modelNode.isRootNode()) d->formEditorView->crumblePath()->popElement(); if (node.isRootNode() && d->formEditorView->crumblePath()->dataForLastIndex().isValid()) d->formEditorView->crumblePath()->popElement(); changeToSubComponent(node); DesignDocumentControllerPrivate::clearCrumblePath = true; }
void ViewManager::detachComponentView() { QObject::disconnect(m_componentView.action(), SIGNAL(currentComponentChanged(ModelNode)), currentDesignDocument(), SLOT(changeToSubComponent(ModelNode))); documentModel()->detachView(&m_componentView); }