Skip to content

qmlui,webaccess: stuck ComboBoxes after change from local UI #1960

@jpue

Description

@jpue

Describe the bug / To Reproduce

  1. Start QLC+ (v5, new workspace) with the command line parameter -w to enable the webaccess.
  2. Add a RGB matrix function. Switch to the Virtual Console, add an Animation widget and the RGB matrix function to it.
  3. Open the webaccess in a web browser and change the Animation algorithm from there (!).
    -> The algorithm combo box changes both in the webaccess and locally.
  4. Now, change the Animation algorithm via the local (!) QLC+ UI.
    -> The algorithm combo box changes both in the webaccess and locally.
  5. Finally, change the Animation algorithm again via the webaccess.
    -> The algorithm combo box changes in the webaccess, but no longer locally. Furthermore, this issue seems to affect all CustomComboBoxes (see, for example, also the Universe selection of the Simple Desk).

Expected behaviour
The webaccess and the local UI should stay synchronised (as long as the network connection is not interrupted).

Problem Analysis
First, when connecting fixtures RGB matrix function and/or inspecting the VCAnimation C++ class, it appears that this is only a display bug, since internally, all variables are always correctly set.

Then, when changing the QLC+ specific CustomComboBox to a standard Qt ComboBox in the VCAnimationItem QML file, the described issue also does no longer occur. This hints at a bug in the CustomComboBox.

Since I have little experience with the QML code, this was not straightforward for me to debug, but through much trial-and-error, I found that commenting out currentIndex = index (line 215) fixes the issue.

Why this is the case and whether this really solves the underlying problem still needs to be figured out.

My guess is that this is an edge case where the information propagation slightly differs (user event -> VCAnimationItem QML -> VCAnimation C++ class vs. webaccess event -> WebSocket message to WebAccess C++ class -> VCAnimation C++ class -> VCAnimationItem QML -> CustomComboBox QML -> local UI), resulting in the observed behaviour.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions