Details
-
Bug
-
Resolution: Fixed
-
P2: Important
-
6.5.0 Beta2
-
3214689af (dev)
Description
When removing an index one by one from a ListView's model, there is an observed difference in behaviour between a TopToBottom and a BottomToTop vertical layout when you remove the very last remaining index. In the former, the remove transition is triggered as normal for the last delegate. In the latter, the delegate just disappears.
How to reproduce the issue:
- Run the attached example
- Press the Remove 0 button a few times slowly enought to allow the transitions and observe the difference between the bottom left and bottom right delegates when there is only one left.
- Click the Remove 0 once more and the left one will just suddenly disappear whereas the right one will run its transition. After pressing "Add 0" to put it back, and "Remove 0" to remove it again, the transitions run in both cases.
There is also some suspicious compiler warnings when building the example:
Warning: main.qml:94:66: Could not compile binding for onClicked: Cannot generate efficient code for DefineObjectLiteral [compiler]
onClicked: listModel.insert(0, { index: 0, text: text })
^^^^
Warning: main.qml:99:66: Could not compile binding for onClicked: Cannot generate efficient code for DefineObjectLiteral [compiler]
onClicked: listModel.insert(3, { index: 3, text: text })
^^^^
Warning: main.qml:104:38: Could not compile binding for onClicked: Cannot generate efficient code for call to untyped JavaScript function [compiler]
onClicked: listModel.remove(0)
^^^^^^
Warning: main.qml:109:38: Could not compile binding for onClicked: Cannot generate efficient code for call to untyped JavaScript function [compiler]
onClicked: listModel.remove(4)
^^^^^^
Warning: main.qml:117:21: Could not compile binding for onClicked: Instruction "generate_DeadTemporalZoneCheck" not implemented [compiler]
for(let i=0; i < count; i++)
^^^