Skip to content

Commit

Permalink
Merge pull request #4955 from MarcSabatella/barline-crash
Browse files Browse the repository at this point in the history
fix #288190: crash on drag&drop barline
  • Loading branch information
dmitrio95 committed Apr 26, 2019
2 parents 3b29956 + 3db43d9 commit 70504a8
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion libmscore/barline.cpp
Expand Up @@ -307,7 +307,11 @@ BarLine::~BarLine()
QPointF BarLine::canvasPos() const
{
QPointF pos = Element::canvasPos();
pos.ry() += measure()->system()->staff(staffIdx())->y();
if (parent()) {
System* system = measure()->system();
qreal yoff = system ? system->staff(staffIdx())->y() : 0.0;
pos.ry() += yoff;
}
return pos;
}

Expand Down

0 comments on commit 70504a8

Please sign in to comment.