Skip to content

Commit

Permalink
Fix NavigationPanels for toolbars from non-active pages being enabled
Browse files Browse the repository at this point in the history
  • Loading branch information
cbjeukendrup authored and igorkorsukov committed Jul 5, 2021
1 parent 9d28d4a commit 1985e58
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 7 deletions.
3 changes: 2 additions & 1 deletion src/appshell/qml/MainToolBar.qml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ Rectangle {

property alias navigation: keynavSub

property var currentUri: "musescore://home"
property string currentUri: "musescore://home"
property var items: [
{
title: qsTrc("appshell", "Home"),
Expand Down Expand Up @@ -64,6 +64,7 @@ Rectangle {
NavigationPanel {
id: keynavSub
name: "MainToolBar"
enabled: root.enabled && root.visible
accessible.name: qsTrc("appshell", "Main tool bar") + " " + keynavSub.directionInfo
}

Expand Down
1 change: 1 addition & 0 deletions src/appshell/qml/PublishPage/PublishPage.qml
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ DockPage {
minimumWidth: 198

contentComponent: NotationToolBar {
navigation.section: root.topToolKeyNavSec
navigation.order: 2

onActiveFocusRequested: {
Expand Down
2 changes: 1 addition & 1 deletion src/appshell/qml/PublishPage/PublishToolBar.qml
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ Rectangle {

NavigationPanel {
id: keynavSub

name: "PublishToolBar"
enabled: root.enabled && root.visible
}

PublishToolBarModel {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ Rectangle {
NavigationPanel {
id: keynavSub
name: "NotationToolBar"
enabled: root.enabled && root.visible
onActiveChanged: {
if (active) {
root.activeFocusRequested()
Expand Down
3 changes: 2 additions & 1 deletion src/notation/qml/MuseScore/NotationScene/NoteInputBar.qml
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,13 @@ Rectangle {
QtObject {
id: privatesProperties

property bool isHorizontal: orientation === Qt.Horizontal
property bool isHorizontal: root.orientation === Qt.Horizontal
}

NavigationPanel {
id: keynavSub
name: "NoteInputBar"
enabled: root.enabled && root.visible
}

NoteInputBarModel {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ Rectangle {
NavigationPanel {
id: navPanel
name: "UndoRedoToolBar"
enabled: root.enabled && root.visible
}

UndoRedoModel {
Expand Down
9 changes: 5 additions & 4 deletions src/playback/qml/MuseScore/Playback/PlaybackToolBar.qml
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,15 @@ import "internal"
Rectangle {
id: root

property alias navigation: keynavSub
property alias navigation: navPanel
property bool floating: false

color: ui.theme.backgroundPrimaryColor

NavigationPanel {
id: keynavSub
id: navPanel
name: "PlaybackToolBar"
enabled: root.enabled && root.visible
}

PlaybackToolBarModel {
Expand Down Expand Up @@ -94,7 +95,7 @@ Rectangle {
FlatButton {
id: btn
property var modelData
property var hasSubitems: modelData.subitems.length !== 0
property bool hasSubitems: modelData.subitems.length !== 0

icon: modelData.icon

Expand All @@ -108,7 +109,7 @@ Rectangle {
? ui.theme.accentColor : "transparent"
accentButton: modelData.checked || menuLoader.isMenuOpened

navigation.panel: keynavSub
navigation.panel: navPanel
navigation.name: modelData.title
navigation.order: modelData.index
navigation.enabled: playbackModel.isPlayAllowed
Expand Down

0 comments on commit 1985e58

Please sign in to comment.