fixed #10525: Enabled extend slur to the next system after selection
This commit is contained in:
parent
6f9db08697
commit
fa8dea95f2
1 changed files with 7 additions and 3 deletions
|
@ -142,8 +142,11 @@ bool SlurSegment::isEditAllowed(EditData& ed) const
|
|||
return true;
|
||||
}
|
||||
|
||||
if (!((ed.modifiers & Qt::ShiftModifier)
|
||||
&& (isSingleType() || (isBeginType() && ed.curGrip == Grip::START) || (isEndType() && ed.curGrip == Grip::END)))) {
|
||||
const bool moveStart = ed.curGrip == Grip::START;
|
||||
const bool moveEnd = ed.curGrip == Grip::END || ed.curGrip == Grip::DRAG;
|
||||
|
||||
if (!((ed.modifiers & Qt::ShiftModifier) && (isSingleType()
|
||||
|| (isBeginType() && moveStart) || (isEndType() && moveEnd)))) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -293,7 +296,8 @@ void SlurSegment::changeAnchor(EditData& ed, EngravingItem* element)
|
|||
spanner()->layout();
|
||||
if (spanner()->spannerSegments().size() != segments) {
|
||||
const std::vector<SpannerSegment*>& ss = spanner()->spannerSegments();
|
||||
SlurSegment* newSegment = toSlurSegment(ed.curGrip == Grip::END ? ss.back() : ss.front());
|
||||
const bool moveEnd = ed.curGrip == Grip::END || ed.curGrip == Grip::DRAG;
|
||||
SlurSegment* newSegment = toSlurSegment(moveEnd ? ss.back() : ss.front());
|
||||
ed.view()->changeEditElement(newSegment);
|
||||
triggerLayout();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue