Skip to content

Commit

Permalink
Fix note input add button not working
Browse files Browse the repository at this point in the history
  • Loading branch information
mathesoncalum committed Feb 13, 2025
1 parent 8722758 commit cd86ab1
Showing 1 changed file with 4 additions and 13 deletions.
17 changes: 4 additions & 13 deletions src/notation/qml/MuseScore/NotationScene/NoteInputBar.qml
Original file line number Diff line number Diff line change
Expand Up @@ -132,17 +132,13 @@ Item {
navigation.order: Boolean(itemModel) ? itemModel.order : 0
isClickOnKeyNavTriggered: false
navigation.onTriggered: {
if (menuLoader.isMenuOpened || btn.hasMenu) {
if (btn.hasMenu) {
toggleMenuOpened()
} else {
handleMenuItem()
}
}

mouseArea.acceptedButtons: btn.hasMenu
? Qt.LeftButton | Qt.RightButton
: Qt.LeftButton

function toggleMenuOpened() {
menuLoader.toggleOpened(item.subitems)
}
Expand All @@ -151,15 +147,10 @@ Item {
Qt.callLater(noteInputModel.handleMenuItem, item.id)
}

onClicked: function(mouse) {
if (menuLoader.isMenuOpened // If already menu open, close it
|| (btn.hasMenu // Or if can open menu
&& mouse.button === Qt.RightButton)) {
onClicked: {
if (btn.hasMenu) {
toggleMenuOpened()
return
}

if (mouse.button === Qt.LeftButton) {
} else {
handleMenuItem()
}
}
Expand Down

0 comments on commit cd86ab1

Please sign in to comment.