Skip to content

Commit

Permalink
update for properties/styles
Browse files Browse the repository at this point in the history
  • Loading branch information
wschweer committed Mar 27, 2018
1 parent ebf4e54 commit 2580eb7
Show file tree
Hide file tree
Showing 64 changed files with 591 additions and 1,414 deletions.
2 changes: 1 addition & 1 deletion libmscore/chord.h
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ class Chord final : public ChordRest {
void setNoteType(NoteType t) { _noteType = t; }
bool isGrace() const { return _noteType != NoteType::NORMAL; }
void toGraceAfter();
virtual void scanElements(void* data, void (*func)(void*, Element*), bool all=true);
virtual void scanElements(void* data, void (*func)(void*, Element*), bool all=true) override;

virtual void setTrack(int val) override;

Expand Down
2 changes: 1 addition & 1 deletion libmscore/chordrest.h
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ class ChordRest : public DurationElement {

virtual void writeProperties(XmlWriter& xml) const;
virtual bool readProperties(XmlReader&);
virtual void scanElements(void* data, void (*func)(void*, Element*), bool all=true);
virtual void scanElements(void* data, void (*func)(void*, Element*), bool all=true) override;

void setBeamMode(Beam::Mode m) { _beamMode = m; }
void undoSetBeamMode(Beam::Mode m);
Expand Down
4 changes: 2 additions & 2 deletions libmscore/duration.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ namespace Ms {
// DurationElement
//---------------------------------------------------------

DurationElement::DurationElement(Score* s)
: Element(s)
DurationElement::DurationElement(Score* s, ElementFlags f)
: Element(s, f)
{
_tuplet = 0;
}
Expand Down
2 changes: 1 addition & 1 deletion libmscore/duration.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ class DurationElement : public Element {
#endif

public:
DurationElement(Score* s);
DurationElement(Score* = 0, ElementFlags = ElementFlag::NOTHING);
DurationElement(const DurationElement& e);
~DurationElement();

Expand Down
2 changes: 1 addition & 1 deletion libmscore/element.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -483,7 +483,7 @@ void Element::writeProperties(XmlWriter& xml) const
else
xml.tag("pos", pos() / score()->spatium());
}
if (((track() != xml.curTrack()) || (type() == ElementType::SLUR)) && (track() != -1)) {
if (((track() != xml.curTrack()) || isSlur()) && (track() != -1)) {
int t;
t = track() + xml.trackDiff();
xml.tag("track", t);
Expand Down
15 changes: 4 additions & 11 deletions libmscore/glissando.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -474,14 +474,10 @@ void Glissando::write(XmlWriter& xml) const
if (_showText && !_text.isEmpty())
xml.tag("text", _text);

writeProperty(xml, P_ID::GLISS_TYPE);
writeProperty(xml, P_ID::PLAY);
writeProperty(xml, P_ID::GLISSANDO_STYLE);
writeProperty(xml, P_ID::FONT_FACE);
writeProperty(xml, P_ID::FONT_SIZE);
writeProperty(xml, P_ID::FONT_BOLD);
writeProperty(xml, P_ID::FONT_ITALIC);
writeProperty(xml, P_ID::FONT_UNDERLINE);
for (auto id : { P_ID::GLISS_TYPE, P_ID::PLAY, P_ID::GLISSANDO_STYLE, P_ID::FONT_FACE,
P_ID::FONT_SIZE, P_ID::FONT_BOLD, P_ID::FONT_ITALIC, P_ID::FONT_UNDERLINE} )
writeProperty(xml, id);

SLine::writeProperties(xml);
xml.etag();
}
Expand Down Expand Up @@ -794,8 +790,6 @@ QVariant Glissando::propertyDefault(P_ID propertyId) const
switch (propertyId) {
case P_ID::GLISS_TYPE:
return int(GlissandoType::STRAIGHT);
case P_ID::GLISS_TEXT:
return "gliss.";
case P_ID::GLISS_SHOW_TEXT:
return true;
case P_ID::GLISSANDO_STYLE:
Expand All @@ -807,6 +801,5 @@ QVariant Glissando::propertyDefault(P_ID propertyId) const
}
return SLine::propertyDefault(propertyId);
}

}

Loading

0 comments on commit 2580eb7

Please sign in to comment.