File tree Expand file tree Collapse file tree 2 files changed +14
-1
lines changed
src/palette/qml/MuseScore/Palette/internal Expand file tree Collapse file tree 2 files changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -52,6 +52,8 @@ StyledPopupView {
5252 property size cellSize
5353 property bool drawGrid
5454
55+ readonly property bool isDragInProgress: masterPalette .state == " drag" || customPalette .state == " drag"
56+
5557 property int maxHeight: 400
5658 contentHeight: column .implicitHeight
5759 contentWidth: 300
Original file line number Diff line number Diff line change @@ -320,7 +320,18 @@ StyledListView {
320320
321321 onClosed: {
322322 enablePaletteAnimations = false ;
323- palettePopup .active = false ;
323+ // Deactivating the loader while dragging will cause a crash (#25848), so defer the deactivation...
324+ if (! moreElementsPopup .isDragInProgress ) {
325+ palettePopup .active = false ;
326+ }
327+ }
328+
329+ onIsDragInProgressChanged: {
330+ const deactivationWasDeferred = ! moreElementsPopup .isOpened && palettePopup .active
331+ if (! moreElementsPopup .isDragInProgress && deactivationWasDeferred) {
332+ // We're now safe to deactivate the loader...
333+ palettePopup .active = false
334+ }
324335 }
325336
326337 function scrollToPopupBottom () {
You can’t perform that action at this time.
0 commit comments