fix #268065: System text crashes the program when opening a file

This commit is contained in:
Werner Schweer 2018-01-03 16:16:12 +01:00
parent df237c58c2
commit c68c9455d7
3 changed files with 3 additions and 3 deletions

View file

@ -303,6 +303,7 @@ class ScoreElement {
CONVERT(ChordLine, CHORDLINE)
CONVERT(FretDiagram, FRET_DIAGRAM)
CONVERT(Page, PAGE)
CONVERT(StaffText, STAFF_TEXT)
CONVERT(SystemText, SYSTEM_TEXT)
CONVERT(BracketItem, BRACKET_ITEM)
CONVERT(Staff, STAFF)
@ -312,7 +313,6 @@ class ScoreElement {
bool isChordRest() const { return isRest() || isChord() || isRepeatMeasure(); }
bool isDurationElement() const { return isChordRest() || isTuplet(); }
bool isSlurTieSegment() const { return isSlurSegment() || isTieSegment(); }
bool isStaffText() const { return type() == ElementType::STAFF_TEXT || type() == ElementType::SYSTEM_TEXT; }
bool isSLineSegment() const;
bool isBox() const { return isVBox() || isHBox() || isTBox() || isFBox(); }
bool isMeasureBase() const { return isMeasure() || isBox(); }

View file

@ -32,7 +32,7 @@ struct ChannelActions {
// @@ StaffText
//---------------------------------------------------------
class StaffText : public TextBase {
class StaffText final : public TextBase {
QString _channelNames[4];
QList<ChannelActions> _channelActions;
SwingParameters _swingParameters;

View file

@ -21,7 +21,7 @@ namespace Ms {
// SystemText
//---------------------------------------------------------
class SystemText : public TextBase {
class SystemText final : public TextBase {
public:
SystemText(Score* score);
SystemText(SubStyle, Score* = 0);