mirror of
https://github.com/moonlight-stream/moonlight-qt.git
synced 2026-06-18 14:40:56 +00:00
Fix selection loss when going back caused by previous commit
This commit is contained in:
+7
-3
@@ -30,12 +30,16 @@ GridView {
|
|||||||
id: gamepadKeyNav
|
id: gamepadKeyNav
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Component.onCompleted: {
|
||||||
|
// Don't show any highlighted item until interacting with them.
|
||||||
|
// We do this here instead of onActivated to avoid losing the user's
|
||||||
|
// selection when backing out of a different page of the app.
|
||||||
|
currentIndex = -1
|
||||||
|
}
|
||||||
|
|
||||||
StackView.onActivated: {
|
StackView.onActivated: {
|
||||||
appModel.computerLost.connect(computerLost)
|
appModel.computerLost.connect(computerLost)
|
||||||
gamepadKeyNav.enable()
|
gamepadKeyNav.enable()
|
||||||
|
|
||||||
// Don't show any highlighted item until interacting with them
|
|
||||||
currentIndex = -1
|
|
||||||
}
|
}
|
||||||
|
|
||||||
StackView.onDeactivating: {
|
StackView.onDeactivating: {
|
||||||
|
|||||||
+7
-3
@@ -32,14 +32,18 @@ GridView {
|
|||||||
id: gamepadKeyNav
|
id: gamepadKeyNav
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Component.onCompleted: {
|
||||||
|
// Don't show any highlighted item until interacting with them.
|
||||||
|
// We do this here instead of onActivated to avoid losing the user's
|
||||||
|
// selection when backing out of a different page of the app.
|
||||||
|
currentIndex = -1
|
||||||
|
}
|
||||||
|
|
||||||
StackView.onActivated: {
|
StackView.onActivated: {
|
||||||
gamepadKeyNav.enable()
|
gamepadKeyNav.enable()
|
||||||
|
|
||||||
// Setup signals on CM
|
// Setup signals on CM
|
||||||
ComputerManager.computerAddCompleted.connect(addComplete)
|
ComputerManager.computerAddCompleted.connect(addComplete)
|
||||||
|
|
||||||
// Don't show any highlighted item until interacting with them
|
|
||||||
currentIndex = -1
|
|
||||||
}
|
}
|
||||||
|
|
||||||
StackView.onDeactivating: {
|
StackView.onDeactivating: {
|
||||||
|
|||||||
Reference in New Issue
Block a user