Public bug reported:

Steps to reproduce:

1) Run the following QML:

import QtQuick 2.4
import Ubuntu.Components 1.3

MainView {
    Page {
        ListView {
            anchors.fill: parent
            model: 5
            delegate: ListItem {
                onSelectedChanged: {
                    console.log("Selected changed for index: " + index + " to: 
" + selected)
                }
                Label {
                    anchors.centerIn: parent
                    text: index
                }
                Component.onCompleted: {
                    selectMode = true
                }
            }
        }
    }
}

2) Select item 4

Expected outcome:

 Terminal should display:
 
qml: Selected changed for index: 4 to: true

Actual outcome:

 Terminal actually displays:

qml: Selected changed for index: 0 to: false
qml: Selected changed for index: 1 to: false
qml: Selected changed for index: 2 to: false
qml: Selected changed for index: 3 to: false
qml: Selected changed for index: 4 to: true

Items 0 - 3 haven't changed so shouldn't have their selectedChange
signal emitted when item 4 changes.

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

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1493880

Title:
  ListItem's selectedChanged signal is emitted when the selection hasn't
  changed

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

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to