Skip to content

Commit

Permalink
update yOffset in one line staff lineHeight change
Browse files Browse the repository at this point in the history
  • Loading branch information
sammik committed Apr 22, 2024
1 parent 9628efd commit ab5f5f0
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/engraving/dom/stafftypechange.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -149,8 +149,14 @@ bool StaffTypeChange::setProperty(Pid propertyId, const PropertyValue& v)
}
break;
case Pid::LINE_DISTANCE:
{
Spatium yOffset = m_staffType->yoffset() - 2 * m_staffType->lineDistance();
m_staffType->setLineDistance(v.value<Spatium>());
break;
if (m_staffType->lines() == 1) {
m_staffType->setYoffset(yOffset + Spatium(2 * m_staffType->lineDistance()));
}
}
break;
case Pid::STAFF_SHOW_BARLINES:
m_staffType->setShowBarlines(v.toBool());
break;
Expand Down

0 comments on commit ab5f5f0

Please sign in to comment.