fix regression: beam editing
This commit is contained in:
parent
5d605294b3
commit
53f817b45c
3 changed files with 14 additions and 15 deletions
|
@ -1527,7 +1527,7 @@ void Beam::layout2(QList<ChordRest*>crl, SpannerSegmentType, int frag)
|
|||
// create beam segments
|
||||
//---------------------------------------------
|
||||
|
||||
qreal x1 = crl[0]->stemPosX() + crl[0]->pageX();
|
||||
qreal x1 = crl[0]->stemPosX() + crl[0]->pageX() - pageX();
|
||||
|
||||
int baseLevel = 0;
|
||||
for (int beamLevel = 0; beamLevel < beamLevels; ++beamLevel) {
|
||||
|
@ -1570,13 +1570,13 @@ void Beam::layout2(QList<ChordRest*>crl, SpannerSegmentType, int frag)
|
|||
++baseLevel;
|
||||
|
||||
qreal stemWidth = point(score()->styleS(ST_stemWidth));
|
||||
qreal x2 = cr1->stemPosX() + cr1->pageX();
|
||||
qreal x2 = cr1->stemPosX() + cr1->pageX() - _pagePos.x();
|
||||
qreal x3;
|
||||
|
||||
if ((c2 - c1) > 1) {
|
||||
ChordRest* cr2 = crl[c2-1];
|
||||
// create segment
|
||||
x3 = cr2->stemPosX() + cr2->pageX();
|
||||
x3 = cr2->stemPosX() + cr2->pageX() - _pagePos.x();
|
||||
|
||||
if (tab) {
|
||||
x2 -= stemWidth * 0.5;
|
||||
|
|
|
@ -255,24 +255,22 @@ void Chord::setStem(Stem* s)
|
|||
|
||||
//---------------------------------------------------------
|
||||
// stemPosX
|
||||
// return Chord coordinates
|
||||
//---------------------------------------------------------
|
||||
|
||||
qreal Chord::stemPosX() const
|
||||
{
|
||||
qreal x = 0.0;
|
||||
qreal _spatium = spatium();
|
||||
if (staff() && staff()->isTabStaff()) {
|
||||
qreal stemX = static_cast<StaffTypeTablature*>(staff()->staffType())->chordStemPosX(this) * _spatium;
|
||||
return x + stemX;
|
||||
}
|
||||
if (staff() && staff()->isTabStaff())
|
||||
return static_cast<StaffTypeTablature*>(staff()->staffType())->chordStemPosX(this) * spatium();
|
||||
|
||||
if (_up) {
|
||||
qreal nhw = score()->noteHeadWidth();
|
||||
if (_noteType != NOTE_NORMAL)
|
||||
nhw *= score()->styleD(ST_graceNoteMag);
|
||||
nhw *= mag();
|
||||
x += nhw;
|
||||
return nhw;
|
||||
}
|
||||
return x;
|
||||
return 0.0;
|
||||
}
|
||||
|
||||
//---------------------------------------------------------
|
||||
|
@ -283,10 +281,11 @@ qreal Chord::stemPosX() const
|
|||
QPointF Chord::stemPos() const
|
||||
{
|
||||
qreal _spatium = spatium();
|
||||
if (staff() && staff()->isTabStaff())
|
||||
return (static_cast<StaffTypeTablature*>(staff()->staffType())->chordStemPos(this) * _spatium) + pagePos();
|
||||
|
||||
QPointF p(pagePos());
|
||||
|
||||
if (staff() && staff()->isTabStaff())
|
||||
return (static_cast<StaffTypeTablature*>(staff()->staffType())->chordStemPos(this) * _spatium) + p;
|
||||
|
||||
if (_up) {
|
||||
qreal nhw = score()->noteHeadWidth();
|
||||
if (_noteType != NOTE_NORMAL)
|
||||
|
|
|
@ -165,7 +165,7 @@ void ChordRest::writeProperties(Xml& xml) const
|
|||
case BeamMode::BEGIN: s = "begin"; break;
|
||||
case BeamMode::MID: s = "mid"; break;
|
||||
case BeamMode::END: s = "end"; break;
|
||||
case BeamMode::NONE: s = "no"; break;
|
||||
case BeamMode::NONE: s = "no"; break;
|
||||
case BeamMode::BEGIN32: s = "begin32"; break;
|
||||
case BeamMode::BEGIN64: s = "begin64"; break;
|
||||
case BeamMode::INVALID: s = "?"; break;
|
||||
|
|
Loading…
Reference in a new issue