← Back to team overview

touch-packages team mailing list archive

[Bug 1517614] Re: Page.head.sections.selectedIndex binding of values is broken

 

Right. I confirmed the bug. For some reason the selectedIndex of
head.sections is not updated. The binding seems broken.

I did test with the new header that we have in staging:
http://paste.ubuntu.com/13345460/ and that works fine.

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

Title:
  Page.head.sections.selectedIndex binding of values is broken

Status in Canonical System Image:
  New
Status in ubuntu-ui-toolkit package in Ubuntu:
  Triaged

Bug description:
  When trying to assign a binding value to head.sections.selectedIndex, this value is not updated when the bound value changes.
  See the example program below:

  import QtQuick 2.4
  import Ubuntu.Components 1.3

  MainView {
      id: mainview
      objectName: "mainView"

      width: units.gu(100)
      height: units.gu(75)

      Page {
          id: mainPage
          title: "selectedIndex: " + head.sections.selectedIndex + " should be: " + mainPage.selectedIndex
          property int selectedIndex: -1
          head.sections.model: [ "first", "second", "third" ]
          head.sections.selectedIndex: mainPage.selectedIndex

          Rectangle {
              anchors.fill: parent
              color: "white"

              Label {
                  anchors.centerIn: parent
                  text: "Click me"
              }
          }

          MouseArea {
              anchors.fill: parent
              onClicked: mainPage.selectedIndex = (mainPage.selectedIndex + 1) % 3
          }
      }
  }

To manage notifications about this bug go to:
https://bugs.launchpad.net/canonical-devices-system-image/+bug/1517614/+subscriptions


References