Skip to content
Snippets Groups Projects
Commit 30ab38cd authored by Pierre Lamot's avatar Pierre Lamot
Browse files

qml: set teletext page on es change

  a direct binding can't be used there because or we might end up in a loop

  we only update the value when the user changes manually the value.
parent d93395eb
No related branches found
No related tags found
No related merge requests found
......@@ -81,8 +81,30 @@ FocusScope{
editable: true
textColor: widgetfscope.color
bgColor: widgetfscope.bgColor
onValueChanged: player.teletextPage = value
KeyNavigation.right: indexKeyBtn
//only update the player teletext page when the user change the value manually
property bool inhibitPageUpdate: true
onValueChanged: {
if (inhibitPageUpdate)
return
player.teletextPage = value
}
Component.onCompleted: {
value = player.teletextPage
inhibitPageUpdate = false
}
Connections {
target: player
onTeletextPageChanged: {
telePageNumber.inhibitPageUpdate = true
telePageNumber.value = player.teletextPage
telePageNumber.inhibitPageUpdate = false
}
}
}
Widgets.IconToolButton{
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment