Browse Source

qml/MainDisplay: Fix keyboard focus loss when clearing the 'localMenuDelegate'

The previous implementation made us lose the keyboard focus each time we set 'localMenuDelegate' to null.
pull/127/head
Benjamin Arnaud 5 years ago
committed by Hugo Beauzée-Luyssen
parent
commit
74c682d76a
  1. 1
      modules/gui/qt/maininterface/qml/BannerSources.qml
  2. 1
      modules/gui/qt/maininterface/qml/MainDisplay.qml

1
modules/gui/qt/maininterface/qml/BannerSources.qml

@ -340,6 +340,7 @@ FocusScope {
onVisibleChanged: {
//reset the focus on the global group when the local group is hidden,
//this avoids losing the focus if the subview changes
// FIXME: This block needs refactor for keyboard focus.
if (!visible && localMenuGroup.focus) {
localMenuGroup.focus = false
globalMenuGroup.focus = true

1
modules/gui/qt/maininterface/qml/MainDisplay.qml

@ -197,7 +197,6 @@ FocusScope {
model: root.tabModel
onItemClicked: {
sourcesBanner.localMenuDelegate = null
var name = root.tabModel.get(index).name
selectedIndex = index
history.push(["mc", name])

Loading…
Cancel
Save