Index: sources/gui/qml/components/GridSelection.qml =================================================================== diff -u -r2dd4e9c952d65e68f1c81a1cfc13d1f96b0d7d43 -re5ae6f8513673d1c09bd04ec3da08e71bfded5e2 --- sources/gui/qml/components/GridSelection.qml (.../GridSelection.qml) (revision 2dd4e9c952d65e68f1c81a1cfc13d1f96b0d7d43) +++ sources/gui/qml/components/GridSelection.qml (.../GridSelection.qml) (revision e5ae6f8513673d1c09bd04ec3da08e71bfded5e2) @@ -47,6 +47,25 @@ height : _root.rowCount * _root.optionHeight + _title.height + _grid.anchors.topMargin width : _root.colCount * _root.optionWidth + function resetSelection() { + curIndex = -1 + active = false + selectionResetted() + } + + function setSelection(vWhichIndex) { + if(vWhichIndex < _root._itemCount) { + curIndex = vWhichIndex + } else { + curIndex = -1 + } + + clicked(curIndex) + active = true + } + + signal selectionResetted() + signal clicked(int vIndex) Text { id : _title @@ -73,7 +92,7 @@ width : _root.optionWidth radius : Variables.dialogRadius Binding on selected { - when : _root.curIndex > -1 + when : _root.curIndex >= -1 value : index === _root.curIndex } onClicked: {