Skip to content

Commit

Permalink
Merge pull request #18307 from cbjeukendrup/410_crash_ctrlshiftdrag_h…
Browse files Browse the repository at this point in the history
…airpin

[4.1.0] Fix crash when Ctrl+Shift+Dragging Hairpin
  • Loading branch information
cbjeukendrup committed Jun 30, 2023
2 parents f32d585 + 2604906 commit baa047d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/engraving/layout/v0/tlayout.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2395,7 +2395,9 @@ void TLayout::layout(HairpinSegment* item, LayoutContext& ctx)
Dynamic* sd = nullptr;
Dynamic* ed = nullptr;
double dymax = item->hairpin()->placeBelow() ? -10000.0 : 10000.0;
if (item->autoplace() && !ctx.isPaletteMode()) {
if (item->autoplace() && !ctx.isPaletteMode()
&& item->explicitParent() // TODO: remove this line (this might happen when Ctrl+Shift+Dragging an item)
) {
Segment* start = item->hairpin()->startSegment();
Segment* end = item->hairpin()->endSegment();
// Try to fit between adjacent dynamics
Expand Down

0 comments on commit baa047d

Please sign in to comment.