Make tab keybinds work on room pane views

This commit is contained in:
miruka
2019-12-13 17:59:58 -04:00
parent d8639db8ee
commit c6295225fb
2 changed files with 4 additions and 2 deletions

View File

@@ -3,6 +3,7 @@ import QtQuick.Controls 2.12
SwipeView {
Component.onCompleted: if (! changed) {
if (becomeKeyboardTabsTarget) shortcuts.tabsTarget = this
setCurrentIndex(window.getState(this, "currentIndex", defaultIndex))
saveEnabled = true
}
@@ -17,6 +18,7 @@ SwipeView {
// Prevent onCurrentIndexChanged from running before Component.onCompleted
property bool saveEnabled: false
property bool becomeKeyboardTabsTarget: true
property int defaultIndex: 0
property bool changed: currentIndex !== defaultIndex