allow unstyled dynamics

This commit is contained in:
Werner Schweer 2012-07-22 17:11:36 +02:00
parent 3432cdcc5f
commit 88e6e99aa9
5 changed files with 9 additions and 10 deletions

View file

@ -154,13 +154,13 @@ void Dynamic::setSubtype(const QString& tag)
for (int i = 1; i < n; ++i) {
if (dynList[i].tag == tag) {
_subtype = i;
setTextStyleType(TEXT_STYLE_DYNAMICS2);
// setTextStyleType(TEXT_STYLE_DYNAMICS2);
setText(dynList[i].tag);
return;
}
}
_subtype = 0;
setTextStyleType(TEXT_STYLE_DYNAMICS);
// setTextStyleType(TEXT_STYLE_DYNAMICS);
setText(tag);
}

View file

@ -44,7 +44,7 @@ class Dynamic : public Text {
mutable QPointF dragOffset;
int _velocity; // associated midi velocity 0-127
DynamicType _dynType;
DynamicType _dynType; // DYNAMIC_STAFF, DYNAMIC_PART, DYNAMIC_SYSTEM
public:
Dynamic(Score*);
@ -72,7 +72,6 @@ class Dynamic : public Text {
DynamicType dynType() const { return _dynType; }
void setDynType(DynamicType t) { _dynType = t; }
virtual QLineF dragAnchor() const;
};

View file

@ -870,9 +870,9 @@ bool TextStyleData::readProperties(const QDomElement& e)
sizeIsSpatiumDependent = val.toDouble();
else if (tag == "frameWidth") {
frameWidth = val.toDouble();
hasFrame = frameWidth != 0.0;
hasFrame = true;
}
else if (tag == "frame") // obsolete
else if (tag == "frame") // obsolete
hasFrame = i;
else if (tag == "paddingWidth")
paddingWidth = val.toDouble();

View file

@ -439,7 +439,7 @@ bool Text::readProperties(const QDomElement& e)
else if (tag == "subtype") // obsolete
;
else if (_textStyle.readProperties(e))
; // setUnstyled();
;
else if (!Element::readProperties(e))
return false;
return true;

View file

@ -30,7 +30,7 @@ MuseScore {
var element = segment.element(track);
if (element) {
var type = element.type;
console.log(type);
console.log(type);
}
segment = segment.next1();
}