don't save autoplaced slur segments

This commit is contained in:
Werner Schweer 2016-11-16 10:16:57 +01:00
parent db99ff0b15
commit cbe26a3371
6 changed files with 5 additions and 34 deletions

View file

@ -2672,8 +2672,7 @@ QPointF Chord::layoutArticulation(Articulation* a)
qreal y = 0.0;
// TENUTO and STACCATO: always near the notehead (or stem end if beyond a stem)
if ((a->isTenuto() || a->isStaccato() || a->isAccent())
&& (aa != ArticulationAnchor::TOP_STAFF && aa != ArticulationAnchor::BOTTOM_STAFF)) {
if ((a->isTenuto() || a->isStaccato() || a->isAccent()) && (aa != ArticulationAnchor::TOP_STAFF && aa != ArticulationAnchor::BOTTOM_STAFF)) {
bool bottom; // true: artic. is below chord | false: artic. is above chord
bool alignToStem = false;
// if there area voices, articulation is on stem side

View file

@ -539,8 +539,8 @@ void ChordRest::layoutArticulations()
}
}
staffTopY = qMin(staffTopY, qreal(chordTopY - distance0 - 0.5 * _spatium));
staffBotY = qMax(staffBotY, qreal(chordBotY + distance0 + 0.5 * _spatium));
staffTopY = qMin(staffTopY, chordTopY - distance0 - 0.5 * _spatium);
staffBotY = qMax(staffBotY, chordBotY + distance0 + 0.5 * _spatium);
qreal dy = 0.0;

View file

@ -72,7 +72,6 @@ QVariant SlurTieSegment::getProperty(P_ID propertyId) const
case P_ID::SLUR_DIRECTION:
return slurTie()->getProperty(propertyId);
case P_ID::SLUR_UOFF1:
printf("get uoff1\n");
return ups(Grip::START).off;
case P_ID::SLUR_UOFF2:
return ups(Grip::BEZIER1).off;
@ -96,7 +95,6 @@ bool SlurTieSegment::setProperty(P_ID propertyId, const QVariant& v)
case P_ID::SLUR_DIRECTION:
return slurTie()->setProperty(propertyId, v);
case P_ID::SLUR_UOFF1:
printf("set uoff1\n");
ups(Grip::START).off = v.toPointF();
break;
case P_ID::SLUR_UOFF2:
@ -129,7 +127,6 @@ QVariant SlurTieSegment::propertyDefault(P_ID id) const
case P_ID::SLUR_UOFF2:
case P_ID::SLUR_UOFF3:
case P_ID::SLUR_UOFF4:
printf("uoff default\n");
return QPointF();
default:
return SpannerSegment::propertyDefault(id);
@ -143,7 +140,6 @@ printf("uoff default\n");
void SlurTieSegment::reset()
{
Element::reset();
printf("slur tie reset\n");
undoResetProperty(P_ID::SLUR_UOFF1);
undoResetProperty(P_ID::SLUR_UOFF2);
undoResetProperty(P_ID::SLUR_UOFF3);
@ -158,14 +154,7 @@ printf("slur tie reset\n");
void SlurTieSegment::writeSlur(Xml& xml, int no) const
{
if (ups(Grip::START).off.isNull()
&& ups(Grip::END).off.isNull()
&& ups(Grip::BEZIER1).off.isNull()
&& ups(Grip::BEZIER2).off.isNull()
&& userOff().isNull()
&& visible()
&& (color() == Qt::black)
)
if (autoplace() && visible() && (color() == Qt::black))
return;
xml.stag(QString("SlurSegment no=\"%1\"").arg(no));
@ -200,6 +189,7 @@ void SlurTieSegment::read(XmlReader& e)
else if (!Element::readProperties(e))
e.unknown();
}
setAutoplace(false);
}
//---------------------------------------------------------

View file

@ -269,12 +269,6 @@
</LayoutBreak>
<Slur id="5">
<track>0</track>
<SlurSegment no="1">
<o1 x="0" y="0"/>
<o2 x="0" y="-0.181467"/>
<o3 x="0" y="0.0235572"/>
<o4 x="0" y="0"/>
</SlurSegment>
</Slur>
<Chord>
<durationType>quarter</durationType>

View file

@ -111,12 +111,6 @@
</Rest>
<Slur id="2">
<track>0</track>
<SlurSegment no="0">
<o1 x="0" y="0"/>
<o2 x="0" y="0.000690424"/>
<o3 x="0" y="-0.0154846"/>
<o4 x="0" y="0"/>
</SlurSegment>
<slurDirection>up</slurDirection>
</Slur>
<Chord>

View file

@ -111,12 +111,6 @@
</Rest>
<Slur id="2">
<track>0</track>
<SlurSegment no="0">
<o1 x="0" y="0"/>
<o2 x="0" y="-0.00604269"/>
<o3 x="0" y="-0.130918"/>
<o4 x="0" y="0"/>
</SlurSegment>
<slurDirection>up</slurDirection>
</Slur>
<Chord>