Skip to content

Commit c712bdf

Browse files
1 parent 629fa32 commit c712bdf

File tree

2 files changed

+24
-6
lines changed

2 files changed

+24
-6
lines changed

src/engraving/libmscore/tremolo.cpp

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -600,6 +600,26 @@ void Tremolo::triggerLayout() const
600600
}
601601
}
602602

603+
bool Tremolo::needStartEditingAfterSelecting() const
604+
{
605+
return twoNotes();
606+
}
607+
608+
int Tremolo::gripsCount() const
609+
{
610+
return twoNotes() ? 3 : 0;
611+
}
612+
613+
Grip Tremolo::initialEditModeGrip() const
614+
{
615+
return twoNotes() ? Grip::END : Grip::NO_GRIP;
616+
}
617+
618+
Grip Tremolo::defaultGrip() const
619+
{
620+
return twoNotes() ? Grip::MIDDLE : Grip::NO_GRIP;
621+
}
622+
603623
//---------------------------------------------------------
604624
// gripsPositions
605625
//---------------------------------------------------------

src/engraving/libmscore/tremolo.h

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -132,15 +132,13 @@ class Tremolo final : public EngravingItem
132132
void setUp(bool up) { _up = up; }
133133

134134
// only need grips for two-note trems
135-
bool needStartEditingAfterSelecting() const override { return twoNotes(); }
136-
int gripsCount() const override { return 3; }
137-
Grip initialEditModeGrip() const override { return Grip::END; }
138-
Grip defaultGrip() const override { return Grip::MIDDLE; }
135+
bool needStartEditingAfterSelecting() const override;
136+
int gripsCount() const override;
137+
Grip initialEditModeGrip() const;
138+
Grip defaultGrip() const override;
139139
std::vector<mu::PointF> gripsPositions(const EditData&) const override;
140140
bool isMovable() const override { return true; }
141-
void startDrag(EditData&) override {}
142141
bool isEditable() const override { return true; }
143-
void startEdit(EditData&) override {}
144142
void endEdit(EditData&) override;
145143
void editDrag(EditData&) override;
146144

0 commit comments

Comments
 (0)