Merge pull request #5718 from Howard-C/cross-staff-offset

fix #284682: position offset when moving cross-beam notes with the mouse
This commit is contained in:
Dmitri Ovodok 2020-02-20 13:45:21 +02:00 committed by GitHub
commit 6631fee136
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 4 deletions

View file

@ -2406,7 +2406,7 @@ void Note::editDrag(EditData& editData)
void Note::verticalDrag(EditData &ed)
{
Fraction _tick = chord()->tick();
Fraction _tick = chord()->tick();
const Staff* stf = staff();
const StaffType* st = stf->staffType(_tick);
@ -2438,7 +2438,8 @@ void Note::verticalDrag(EditData &ed)
}
else {
Key key = staff()->key(_tick);
int newPitch = line2pitch(ned->line + lineOffset, staff()->clef(_tick), key);
int idx = chord()->vStaffIdx();
int newPitch = line2pitch(ned->line + lineOffset, score()->staff(idx)->clef(_tick), key);
if (!concertPitch()) {
Interval interval = staff()->part()->instrument(_tick)->transpose();

View file

@ -286,7 +286,7 @@ class Note final : public Element {
void normalizeLeftDragDelta(Segment* seg, EditData &ed, NoteEditData* ned);
public:
public:
Note(Score* s = 0);
Note(const Note&, bool link = false);
~Note();
@ -324,7 +324,7 @@ public:
void setHeadGroup(NoteHead::Group val);
void setHeadType(NoteHead::Type t);
virtual int subtype() const override { return (int) _headGroup; }
virtual int subtype() const override { return int(_headGroup); }
virtual QString subtypeName() const override;
void setPitch(int val);