Skip to content

Commit

Permalink
Merge pull request #366 from mgavioli/Fix_21121_Pasting_unstyled_text…
Browse files Browse the repository at this point in the history
…_crashes

Fix #21121 - Pasting unstyled text causes crash
  • Loading branch information
lasconic committed May 18, 2013
2 parents 910ccf3 + 10a529a commit cd7698d
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions libmscore/chordrest.cpp
Expand Up @@ -834,7 +834,7 @@ Element* ChordRest::drop(const DropData& data)
{
Text* f = static_cast<Text*>(e);
int st = f->textStyleType();
if (st != TEXT_STYLE_UNKNOWN)
if (st >= TEXT_STYLE_DEFAULT)
f->setTextStyleType(st);
}
score()->undoAddElement(e);
Expand All @@ -848,9 +848,8 @@ Element* ChordRest::drop(const DropData& data)
fb->setTrack( (track() / VOICES) * VOICES );
fb->setTicks( duration().ticks() );
fb->setOnNote(true);
/* FiguredBass * fbNew =*/ FiguredBass::addFiguredBassToSegment(segment(),
FiguredBass::addFiguredBassToSegment(segment(),
fb->track(), fb->ticks(), &bNew);
// fbNew = fb;
if (bNew)
score()->undoAddElement(e);
return e;
Expand Down

0 comments on commit cd7698d

Please sign in to comment.