Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Marco Bubke
flatpak-qt-creator
Commits
989d609b
Commit
989d609b
authored
Sep 28, 2010
by
Marco Bubke
Browse files
QmlDesigner.Model: Fixes order problem
The order of allModelNode function was not in order.
parent
a4dfc502
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/plugins/qmldesigner/designercore/instances/nodeinstanceview.cpp
View file @
989d609b
...
...
@@ -390,6 +390,7 @@ void NodeInstanceView::instancePropertyChange(const QList<QPair<ModelNode, QStri
//\}
void
NodeInstanceView
::
loadNodes
(
const
QList
<
ModelNode
>
&
nodeList
)
{
foreach
(
const
ModelNode
&
node
,
nodeList
)
...
...
@@ -405,8 +406,11 @@ void NodeInstanceView::loadNodes(const QList<ModelNode> &nodeList)
instanceForNode
(
node
).
setPropertyBinding
(
property
.
name
(),
property
.
expression
());
}
foreach
(
NodeInstance
instance
,
m_objectInstanceHash
.
values
())
instance
.
doComponentComplete
();
QListIterator
<
ModelNode
>
listIterator
(
nodeList
);
listIterator
.
toBack
();
while
(
listIterator
.
hasPrevious
())
instanceForNode
(
listIterator
.
previous
()).
doComponentComplete
();
}
// TODO: Set base state as current model state
...
...
src/plugins/qmldesigner/designercore/model/model.cpp
View file @
989d609b
...
...
@@ -1218,7 +1218,18 @@ bool ModelPrivate::hasId(const QString &id) const
QList
<
InternalNodePointer
>
ModelPrivate
::
allNodes
()
const
{
return
m_nodeSet
.
toList
();
// the item must be ordered!
QList
<
InternalNodePointer
>
nodeList
;
if
(
m_rootInternalNode
.
isNull
()
||
!
m_rootInternalNode
->
isValid
())
return
nodeList
;
nodeList
.
append
(
m_rootInternalNode
);
nodeList
.
append
(
m_rootInternalNode
->
allSubNodes
());
return
nodeList
;
}
bool
ModelPrivate
::
isWriteLocked
()
const
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment