Commit 2eb7f18b authored by Thomas Hartmann's avatar Thomas Hartmann

QmlDesigner.propertyEditor: fixes anchoring in flickable

Searching through "children" is not enough since
some items have default properties like "flickableChildren".
So we mimic instanceChildren here by taking all subnodes and
comparing the instanceParent.

Reviewed-by: Kai Koehne
parent 057d4f7d
......@@ -74,9 +74,15 @@ void SiblingComboBox::setup()
connect(this, SIGNAL(currentIndexChanged (int)), this, SLOT(changeSelection(int)));
if (!m_itemNode.isValid())
m_itemList = m_itemNode.instanceParent().toQmlItemNode().children();
if (m_itemNode.instanceParent().modelNode().isValid())
m_itemList = toQmlItemNodeList(m_itemNode.instanceParent().modelNode().allDirectSubModelNodes());
//We currently have no instanceChildren().
//So we double check here if the instanceParents are equal.
foreach (const QmlItemNode &node, m_itemList)
if (node.instanceParent().modelNode() != m_itemNode.instanceParent().modelNode())
disconnect(this, SIGNAL(currentIndexChanged (int)), this, SLOT(changeSelection(int)));
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