Comment 1 for bug 1534112

Revision history for this message
Olivier Tilloy (osomon) wrote :

I can reproduce the problem outside of the browser app, with the following standalone QML example:

import QtQuick 2.4
import Ubuntu.Components 1.3

ListView {
  id: listview
  width: 300
  height: 120
  model: 2
  delegate: ListItem {
    selectMode: true
    Label {
      anchors.centerIn: parent
      text: "selected: " + selected
    }
    property bool lastSelected: false
    onSelectedChanged: {
      if (selected && !lastSelected) {
        listview.ViewItems.selectedIndices = [index]
      }
      lastSelected = selected
    }
  }
}

To reproduce, check the first item, then the second one, then the first one again, then the second one again.