← Back to team overview

ubuntu-sdk-bugs team mailing list archive

[Bug 1577351] [NEW] OptionSelector: selectedIndex should be updated before onTriggered and onDelegateClicked

 

Public bug reported:

            OptionSelector {
                onSelectedIndexChanged: {
                    console.log("SelectedIndex Changed")
                }
                onTriggered:  {
                    console.log("On Triggered")
                }
                onDelegateClicked: {
                    console.log("Delegate Clicked: " + index)
                }


With this example we see that onTriggered and onDelegateClicked are being fired before selectedIndex has been updated. This makes the onTriggered quite useless, as the important info of which is the selectedIndex is not there yet. onDelegateClicked suffers from the same problem, although it's index argument allows to workaround this bug.

IMHO having the selectedIndex updated before triggering these signals is
a justifiable and sane behavior.

** Affects: ubuntu-ui-toolkit (Ubuntu)
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Ubuntu
SDK bug tracking, which is subscribed to ubuntu-ui-toolkit in Ubuntu.
https://bugs.launchpad.net/bugs/1577351

Title:
  OptionSelector: selectedIndex should be updated before onTriggered and
  onDelegateClicked

Status in ubuntu-ui-toolkit package in Ubuntu:
  New

Bug description:
              OptionSelector {
                  onSelectedIndexChanged: {
                      console.log("SelectedIndex Changed")
                  }
                  onTriggered:  {
                      console.log("On Triggered")
                  }
                  onDelegateClicked: {
                      console.log("Delegate Clicked: " + index)
                  }

  
  With this example we see that onTriggered and onDelegateClicked are being fired before selectedIndex has been updated. This makes the onTriggered quite useless, as the important info of which is the selectedIndex is not there yet. onDelegateClicked suffers from the same problem, although it's index argument allows to workaround this bug.

  IMHO having the selectedIndex updated before triggering these signals
  is a justifiable and sane behavior.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/ubuntu-ui-toolkit/+bug/1577351/+subscriptions


Follow ups