forked from qt-creator/qt-creator
QmlDesigner: Fix crumble bar for infile components
CrumbleBarInfo contains the ModelNode to properly identify the node. We cannot use the id, because no every component has an id. If the crumble bar only contains one item it is hidden. Change-Id: I4d421eaad8962aa9043567e1f27957b1aa089766 Reviewed-by: Marco Bubke <marco.bubke@digia.com>
This commit is contained in:
@@ -285,18 +285,11 @@ void DesignDocument::changeToInFileComponentModel(ComponentTextModifier *textMod
|
||||
viewManager().attachViewsExceptRewriterAndComponetView();
|
||||
}
|
||||
|
||||
void DesignDocument::changeToSubComponentAndPushOnCrumblePath(const ModelNode &componentNode)
|
||||
void DesignDocument::changeToSubComponent(const ModelNode &componentNode)
|
||||
{
|
||||
if (QmlDesignerPlugin::instance()->currentDesignDocument() != this)
|
||||
return;
|
||||
|
||||
changeToSubComponent(componentNode);
|
||||
|
||||
QmlDesignerPlugin::instance()->viewManager().pushInFileComponentOnCrambleBar(componentNode.id());
|
||||
}
|
||||
|
||||
void DesignDocument::changeToSubComponent(const ModelNode &componentNode)
|
||||
{
|
||||
if (m_inFileComponentModel)
|
||||
changeToDocumentModel();
|
||||
|
||||
@@ -304,6 +297,8 @@ void DesignDocument::changeToSubComponent(const ModelNode &componentNode)
|
||||
|
||||
if (subComponentLoaded)
|
||||
attachRewriterToModel();
|
||||
|
||||
QmlDesignerPlugin::instance()->viewManager().pushInFileComponentOnCrumbleBar(componentNode);
|
||||
}
|
||||
|
||||
void DesignDocument::attachRewriterToModel()
|
||||
|
||||
Reference in New Issue
Block a user