Skip to content

Commit

Permalink
fix #22994: cross-staff grace note layout
Browse files Browse the repository at this point in the history
  • Loading branch information
lasconic committed Aug 28, 2015
1 parent e063474 commit 97dd75a
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
21 changes: 21 additions & 0 deletions libmscore/chord.cpp
Expand Up @@ -1692,6 +1692,27 @@ void Chord::cmdUpdateNotes(AccidentalState* as)
sortNotes();
}

//---------------------------------------------------------
// pagePos
//---------------------------------------------------------

QPointF Chord::pagePos() const
{
if (isGrace()) {
QPointF p(pos());
if (parent() == 0)
return p;
p.rx() = pageX();

const Chord* pc = static_cast<const Chord*>(parent());
System* system = pc->segment()->system();
int csi = staffIdx() + staffMove();
p.ry() += system->staffYpage(csi);
return p;
}
return Element::pagePos();
}

//---------------------------------------------------------
// layout
//---------------------------------------------------------
Expand Down
1 change: 1 addition & 0 deletions libmscore/chord.h
Expand Up @@ -188,6 +188,7 @@ class Chord : public ChordRest {

Note* selectedNote() const;
virtual void layout();
virtual QPointF pagePos() const override; ///< position in page coordinates
void layout2();
void cmdUpdateNotes(AccidentalState*);

Expand Down

0 comments on commit 97dd75a

Please sign in to comment.