QmllDesigner: Refactoring to use allSubModelNodesAndThisNode

Change-Id: Ied8f2e9e10163f46c862edb6ee8e96a58a36bd71
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com>
This commit is contained in:
Marco Bubke
2014-04-23 13:02:06 +02:00
parent 7f55922a3d
commit 076bea31ba
2 changed files with 2 additions and 9 deletions

View File

@@ -192,14 +192,9 @@ void ComponentView::nodeCreated(const ModelNode &createdNode)
void ComponentView::searchForComponentAndAddToList(const ModelNode &node)
{
QList<ModelNode> nodeList;
nodeList.append(node);
nodeList.append(node.allSubModelNodes());
bool masterNotAdded = true;
foreach (const ModelNode &node, nodeList) {
foreach (const ModelNode &node, node.allSubModelNodesAndThisNode()) {
if (node.nodeSourceType() == ModelNode::NodeWithComponentSource) {
if (masterNotAdded) {
masterNotAdded = true;