If you call addWidget inside the grid added or removed events, the items passed in the event for the
Calling addWidget inside the "added" event triggers another "added" event with the items argument containing the newly added item and the initial item that triggered the first added event. The second "added" event should contain only the newly added item.
This happens because the "added" event is triggerd first and the internal addedNodes array is emptied afterwards. The fix was to empty the addedNodes array before triggering the "added" event.
The same happens when calling removeWidget inside the "removed" event.
If you call addWidget inside the grid added or removed events, the items passed in the event for the
Calling addWidget inside the "added" event triggers another "added" event with the items argument containing the newly added item and the initial item that triggered the first added event. The second "added" event should contain only the newly added item.
This happens because the "added" event is triggerd first and the internal addedNodes array is emptied afterwards. The fix was to empty the addedNodes array before triggering the "added" event.
The same happens when calling removeWidget inside the "removed" event.