Merge pull request #3953 from mattmcclinch/276149-resize-bracket
fix #276149: Resizing bracket causes crash
This commit is contained in:
commit
d83a8ee585
3 changed files with 7 additions and 5 deletions
|
@ -276,6 +276,7 @@ void Bracket::draw(QPainter* painter) const
|
|||
void Bracket::startEdit(EditData& ed)
|
||||
{
|
||||
Element::startEdit(ed);
|
||||
ay1 = pagePos().y();
|
||||
ed.grips = 1;
|
||||
ed.curGrip = Grip::START;
|
||||
}
|
||||
|
@ -315,7 +316,6 @@ void Bracket::editDrag(EditData& ed)
|
|||
|
||||
void Bracket::endEditDrag(EditData&)
|
||||
{
|
||||
qreal ay1 = pagePos().y();
|
||||
qreal ay2 = ay1 + h2 * 2;
|
||||
|
||||
int staffIdx1 = staffIdx();
|
||||
|
|
|
@ -28,6 +28,7 @@ enum class BracketType : signed char;
|
|||
|
||||
class Bracket final : public Element {
|
||||
BracketItem* _bi;
|
||||
qreal ay1;
|
||||
qreal h2;
|
||||
|
||||
int _firstStaff;
|
||||
|
|
|
@ -3744,10 +3744,6 @@ void Score::doLayoutRange(int stick, int etick)
|
|||
// qDebug("start <%s> tick %d, system %p", m->name(), m->tick(), m->system());
|
||||
lc.score = m->score();
|
||||
|
||||
if (lineMode()) {
|
||||
layoutLinear(layoutAll, lc);
|
||||
return;
|
||||
}
|
||||
std::vector<std::pair<int, BracketItem*>> selectedBrackets;
|
||||
|
||||
if (!layoutAll && m->system()) {
|
||||
|
@ -3814,6 +3810,11 @@ void Score::doLayoutRange(int stick, int etick)
|
|||
lc.nextMeasure = _measures.first();
|
||||
}
|
||||
|
||||
if (lineMode()) {
|
||||
layoutLinear(layoutAll, lc);
|
||||
return;
|
||||
}
|
||||
|
||||
lc.prevMeasure = 0;
|
||||
|
||||
getNextMeasure(lc);
|
||||
|
|
Loading…
Reference in a new issue