fix #278490 Lines placed above the top staff when single note selected

This commit is contained in:
ws 2018-12-12 14:41:57 +01:00
parent d9c6f8c5f5
commit c489ea507a
8 changed files with 10 additions and 1 deletions

View file

@ -478,6 +478,7 @@ static const ElementStyle hairpinSegmentStyle {
LineSegment* Hairpin::createLineSegment()
{
HairpinSegment* h = new HairpinSegment(this, score());
h->setTrack(track());
h->initElementStyle(&hairpinSegmentStyle);
return h;
}

View file

@ -98,7 +98,9 @@ void LetRing::write(XmlWriter& xml) const
LineSegment* LetRing::createLineSegment()
{
return new LetRingSegment(this, score());
LetRingSegment* lr = new LetRingSegment(this, score());
lr->setTrack(track());
return lr;
}
//---------------------------------------------------------

View file

@ -33,6 +33,7 @@ NoteLine::NoteLine(const NoteLine& nl)
LineSegment* NoteLine::createLineSegment()
{
TextLineSegment* seg = new TextLineSegment(this, score());
seg->setTrack(track());
return seg;
}

View file

@ -242,6 +242,7 @@ static const ElementStyle ottavaSegmentStyle {
LineSegment* Ottava::createLineSegment()
{
OttavaSegment* os = new OttavaSegment(this, score());
os->setTrack(track());
os->initElementStyle(&ottavaSegmentStyle);
return os;
}

View file

@ -120,6 +120,7 @@ static const ElementStyle palmMuteSegmentStyle {
LineSegment* PalmMute::createLineSegment()
{
PalmMuteSegment* pms = new PalmMuteSegment(this, score());
pms->setTrack(track());
pms->initElementStyle(&palmMuteSegmentStyle);
return pms;
}

View file

@ -148,6 +148,7 @@ static const ElementStyle pedalSegmentStyle {
LineSegment* Pedal::createLineSegment()
{
PedalSegment* p = new PedalSegment(this, score());
p->setTrack(track());
p->initElementStyle(&pedalSegmentStyle);
return p;
}

View file

@ -96,6 +96,7 @@ TextLine::TextLine(const TextLine& tl)
LineSegment* TextLine::createLineSegment()
{
TextLineSegment* seg = new TextLineSegment(this, score());
seg->setTrack(track());
// note-anchored line segments are relative to system not to staff
if (anchor() == Spanner::Anchor::NOTE)
seg->setFlag(ElementFlag::ON_STAFF, false);

View file

@ -172,6 +172,7 @@ static const ElementStyle voltaSegmentStyle {
LineSegment* Volta::createLineSegment()
{
VoltaSegment* vs = new VoltaSegment(this, score());
vs->setTrack(track());
vs->initElementStyle(&voltaSegmentStyle);
return vs;
}