Skip to content

Commit

Permalink
Prefer ChordRest segment when dragging if at the same position
Browse files Browse the repository at this point in the history
  • Loading branch information
mike-spa committed Mar 7, 2025
1 parent 603b7e5 commit f7a214a
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/engraving/dom/score.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -743,6 +743,12 @@ void Score::dragPosition(const PointF& p, staff_idx_t* rst, Segment** seg, doubl
SegmentType st = allowTimeAnchor ? Segment::CHORD_REST_OR_TIME_TICK_TYPE : SegmentType::ChordRest;
Segment* segment = m->searchSegment(pppp.x(), st, strack, etrack, *seg, spacingFactor);
if (segment) {
if (segment->isTimeTickType()) {
if (Segment* crAtSamePos = m->findSegmentR(SegmentType::ChordRest, segment->rtick())) {
// If TimeTick and ChordRest at same position, prefer ChordRest
segment = crAtSamePos;
}
}
*rst = i;
*seg = segment;
return;
Expand Down

0 comments on commit f7a214a

Please sign in to comment.