Details
-
Bug
-
Resolution: Unresolved
-
P3: Somewhat important
-
None
-
5.12.8
-
None
-
Ubuntu 16.04 LTS 64 bit VM, Windows 10 64 bit host
Desktop GCC 64bit
Description
When controlling the timing of the Loader's active property change via a State Transition, the Loader's content is loaded twice.
We have a usecase where it is important to control when a Loader's active property is set to true when raising a popup. This is for timing changes with a fade animation and certain other animations, binding changes, and logic.
We are observing this issue where the content of the Loader is being loaded twice.
In the attached example, I've included two basic "Popup" files, one which exhibits the bug, and another which does not. The issue seems to relate to expression complexity in other PropertyChanges elements' bindings.
Here is some sample output:
qml: Popup active: true qml: Popup new state: active qml: Popup contentLoader loaded qml: Popup contentLoader active changed to: true qml: DoubleLoadingPopup active: true qml: DoubleLoadingPopup new state: active qml: DoubleLoadingPopup contentLoader loaded qml: DoubleLoadingPopup contentLoader active changed to: true qml: DoubleLoadingPopup contentLoader active changed to: false qml: DoubleLoadingPopup contentLoader loaded qml: DoubleLoadingPopup contentLoader active changed to: true
This difference between one popup and the next is observed in this case by changing the PropertyChanges binding preceding the Loader active PropertyChanges element from
100
to:
{return 100}
However any number of other changes can be made to reproduce the issue.
With a more complex example including more PropertyChanges, more States, etc, this issue is nigh on guaranteed to occur.