Skip to content

Commit

Permalink
Merge pull request #27028 from Eism/sound_flags_popups_pos_fix
Browse files Browse the repository at this point in the history
fixed #27021: Unable to select sound flags over staves
  • Loading branch information
DmitryArefiev authored Mar 11, 2025
2 parents 3a6d28d + be436ff commit 7079f9e
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions src/playback/qml/MuseScore/Playback/SoundFlagPopup.qml
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,15 @@ StyledPopupView {
signal elementRectChanged(var elementRect)

function updatePosition() {
var popupHeight = root.contentHeight + root.margins * 2 + root.padding * 2
root.y = -popupHeight
let popupHeight = root.contentHeight + root.margins * 2 + root.padding * 2
let yUp = -popupHeight

let globPos = root.parent.mapToItem(ui.rootItem, Qt.point(root.x, yUp))
if (globPos.y < 0) {
yUp = yUp + (0 - globPos.y)
}

root.y = yUp
root.x = (root.parent.width / 2) - (root.width / 2) + root.margins

root.setOpensUpward(true)
Expand Down

0 comments on commit 7079f9e

Please sign in to comment.