fix regression

This commit is contained in:
ws 2013-07-23 18:49:26 +02:00
parent fb8292b11c
commit c05df37fa0
4 changed files with 27 additions and 15 deletions

View file

@ -52,7 +52,7 @@ struct BeamFragment {
Beam::Beam(Score* s)
: Element(s)
{
setFlags(ELEMENT_SELECTABLE | ELEMENT_STAFF_ORIGIN);
setFlags(ELEMENT_SELECTABLE);
_direction = MScore::AUTO;
_up = true;
_distribute = false;

View file

@ -657,6 +657,30 @@ void Score::doLayout()
}
}
layoutSpanner();
if (layoutMode() != LayoutLine) {
layoutSystems2();
layoutPages(); // create list of pages
}
for (Measure* m = firstMeasure(); m; m = m->nextMeasure())
m->layout2();
// rebuildBspTree(); called in layoutSpanner
int n = viewer.size();
for (int i = 0; i < n; ++i)
viewer.at(i)->layoutChanged();
_layoutAll = false;
}
//---------------------------------------------------------
// layoutSpanner
//---------------------------------------------------------
void Score::layoutSpanner()
{
for (const std::pair<int,Spanner*>& s : _spanner.map()) {
Spanner* sp = s.second;
if (sp->type() == Element::OTTAVA && sp->tick2() == -1) {
@ -669,21 +693,7 @@ void Score::doLayout()
else
sp->layout();
}
if (layoutMode() != LayoutLine) {
layoutSystems2();
layoutPages(); // create list of pages
}
for (Measure* m = firstMeasure(); m; m = m->nextMeasure())
m->layout2();
rebuildBspTree();
int n = viewer.size();
for (int i = 0; i < n; ++i)
viewer.at(i)->layoutChanged();
_layoutAll = false;
}
//-------------------------------------------------------------------

View file

@ -937,6 +937,7 @@ class Score : public QObject {
void addSpanner(Spanner*);
ChordRest* findCR(int tick, int track) const;
void layoutSpanner();
friend class ChangeSynthesizerState;
friend class Chord;

View file

@ -91,6 +91,7 @@ void ScoreView::doDragElement(QMouseEvent* ev)
dragStaff->setUserDist(dist);
startMove += delta;
_score->doLayoutSystems();
_score->layoutSpanner();
update();
return;
}