OptionSelector: selectedIndex should be updated before onTriggered and onDelegateClicked

Bug #1577351 reported by Antti Kaijanmäki
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Canonical System Image
Confirmed
Undecided
Zoltan Balogh
ubuntu-ui-toolkit (Ubuntu)
Confirmed
Undecided
Cris Dywan

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.

Changed in canonical-devices-system-image:
assignee: nobody → Zoltan Balogh (bzoltan)
status: New → Confirmed
Cris Dywan (kalikiana)
Changed in ubuntu-ui-toolkit (Ubuntu):
assignee: nobody → Christian Dywan (kalikiana)
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in ubuntu-ui-toolkit (Ubuntu):
status: New → Confirmed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.