Skip to content

Commit

Permalink
Merge pull request #26485 from mathesoncalum/26466-add_button_broken
Browse files Browse the repository at this point in the history
Fix #26466: Note input add button not working
  • Loading branch information
mathesoncalum authored Feb 13, 2025
2 parents cbc57c0 + cd86ab1 commit b9ce664
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 b9ce664

Please sign in to comment.