Skip to content

Commit

Permalink
fix #14548
Browse files Browse the repository at this point in the history
  • Loading branch information
wschweer committed Oct 7, 2014
1 parent 50a6921 commit 161dcb0
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 7 deletions.
8 changes: 5 additions & 3 deletions libmscore/layout.cpp
Expand Up @@ -1835,13 +1835,15 @@ void Score::createMMRests()
int track = staffIdx * VOICES;
TimeSig* ts = static_cast<TimeSig*>(cs->element(track));
if (ts) {
if (ns->element(track) == 0) {
TimeSig* nts = ts->clone();
TimeSig* nts = static_cast<TimeSig*>(ns->element(track));
if (!nts) {
nts = ts->clone();
nts->setParent(ns);
undo(new AddElement(nts));
}
else {
//TODO: check if same time signature
nts->setSig(ts->sig(), ts->timeSigType());
nts->layout();
}
}
}
Expand Down
10 changes: 7 additions & 3 deletions libmscore/timesig.cpp
Expand Up @@ -69,12 +69,16 @@ qreal TimeSig::mag() const

void TimeSig::setSig(const Fraction& f, TimeSigType st)
{
if (_sig != f)
if (_sig != f) {
_sig = f;
_needLayout = true;
}
if (_timeSigType != st) {
_timeSigType = st;
_needLayout = true;
}
if (st == TimeSigType::FOUR_FOUR || st == TimeSigType::ALLA_BREVE)
customText = false;
_timeSigType = st;
_needLayout = true;
_largeParentheses = false;
}

Expand Down
1 change: 0 additions & 1 deletion libmscore/undo.cpp
Expand Up @@ -357,7 +357,6 @@ void Score::undoChangeProperty(Element* e, P_ID t, const QVariant& st, PropertyS
}
}
else if (e->type() == Element::Type::MEASURE) {
qDebug("change property for measure");
if (e->getProperty(t) != st)
undo(new ChangeProperty(e, t, st, ps));
}
Expand Down

0 comments on commit 161dcb0

Please sign in to comment.