aboutsummaryrefslogtreecommitdiffstats
path: root/src/libs/qmlpuppetcommunication
diff options
context:
space:
mode:
authorAli Kianian <[email protected]>2025-04-09 11:12:34 +0300
committerAli Kianian <[email protected]>2025-04-17 13:49:06 +0000
commitd44cbdd68996c5f5580dfaac9bb7ec2b3d314042 (patch)
tree9dfc57c5a31fa203f77772e94d42d2defcd339f2 /src/libs/qmlpuppetcommunication
parenta6fe24f554abf0d581c39ef03a12bca7d533e218 (diff)
QmlDesigner: Fix node order in QmlRewriter
This patch fixes the case for prepending an item to NodeListProperty For the zero index corner case, If the order is available, we should prepend the node. Otherwise, it should be appended. This works for the case of NodeListProperty. If the node order has not been changed, or is not important, we should just append objects. This case works when we load and append nodes consecutively, and node orders are not changed in the transaction. nodeLocation is optional. If it has a value, it means that we need to consider the node location. Otherwise, we should only append. When we search for the items to insert an object after them, if we want to insert an object to the top (pos = -1), we should find the current first object, and return the last non-object item found before the first object. If there's no object, it will be automatically return the last non-object. Fixes: QDS-15226 Change-Id: I5c5c23a27a956baa15a7a4eecae2fa5d4f9bb650 Reviewed-by: Knud Dollereder <[email protected]>
Diffstat (limited to 'src/libs/qmlpuppetcommunication')
0 files changed, 0 insertions, 0 deletions