Skip to content

Commit

Permalink
fix #24499: chord symbol edit mode layout issues
Browse files Browse the repository at this point in the history
  • Loading branch information
MarcSabatella committed Apr 25, 2014
1 parent cf0bf8c commit c68019f
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 1 deletion.
1 change: 1 addition & 0 deletions libmscore/harmony.cpp
Expand Up @@ -573,6 +573,7 @@ void Harmony::startEdit(MuseScoreView* view, const QPointF& p)
Text::createLayout(); // create TextBlocks from text
}
Text::startEdit(view, p);
layout();
}

//---------------------------------------------------------
Expand Down
13 changes: 13 additions & 0 deletions libmscore/text.cpp
Expand Up @@ -1997,6 +1997,19 @@ void Text::textStyleChanged()
score()->setLayoutAll(true);
}

//---------------------------------------------------------
// setTextStyle
//---------------------------------------------------------

void Text::setTextStyle(const TextStyle& st)
{
_textStyle = st;
if (editMode()) {
setText(plainText());
createLayout();
}
}

//---------------------------------------------------------
// setTextStyleType
//---------------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion libmscore/text.h
Expand Up @@ -222,7 +222,7 @@ class Text : public Element {
bool editMode() const { return _editMode; }
void setEditMode(bool val) { _editMode = val; }

virtual void setTextStyle(const TextStyle& st) { _textStyle = st; }
virtual void setTextStyle(const TextStyle& st);
const TextStyle& textStyle() const { return _textStyle; }
TextStyle& textStyle() { return _textStyle; }
int textStyleType() const { return _styleIndex; }
Expand Down

0 comments on commit c68019f

Please sign in to comment.