selectMode property isn't obeyed on ListItem if set at component creation
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
ubuntu-ui-toolkit (Ubuntu) |
Fix Released
|
Low
|
Zsombor Egri |
Bug Description
Steps to reproduce
1) Run the following QML:
import QtQuick 2.4
import Ubuntu.Components 1.3
MainView {
Page {
ListView {
model: 5
}
}
}
}
}
Expected outcome
ListView should be in selection mode
Actual outcome
ListView isn't in selection mode
This can be worked around by setting the property after the component is complete:
import QtQuick 2.4
import Ubuntu.Components 1.3
MainView {
Page {
ListView {
model: 5
}
}
}
}
}
}
Related branches
- Tim Peeters: Approve
- PS Jenkins bot: Approve (continuous-integration)
-
Diff: 783 lines (+391/-48)12 files modifiedcomponents.api (+2/-0)
src/Ubuntu/Components/Themes/Ambiance/1.3/ListItemStyle.qml (+2/-3)
src/Ubuntu/Components/plugin/plugin.pri (+2/-0)
src/Ubuntu/Components/plugin/privates/listitemselection.cpp (+141/-0)
src/Ubuntu/Components/plugin/privates/listitemselection.h (+56/-0)
src/Ubuntu/Components/plugin/uclistitem.cpp (+38/-26)
src/Ubuntu/Components/plugin/uclistitem.h (+4/-2)
src/Ubuntu/Components/plugin/uclistitem_p.h (+2/-1)
src/Ubuntu/Components/plugin/ucviewitemsattached.cpp (+6/-6)
tests/resources/listitems/ListItemDragging.qml (+7/-2)
tests/unit_x11/tst_components/tst_listitem_selectmode.qml (+69/-4)
tests/unit_x11/tst_components/tst_listitem_selectmode13.qml (+62/-4)
Changed in ubuntu-ui-toolkit (Ubuntu): | |
status: | New → Confirmed |
status: | Confirmed → In Progress |
Actually you can do that on the ListView's level, using ViewItems. selectMode property, no need a Component. onCompleted implementation.