Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix #277030: Crash on changing a property of bracket in a part in Inspector #4033

Merged
merged 1 commit into from Oct 27, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
18 changes: 0 additions & 18 deletions libmscore/layout.cpp
Expand Up @@ -3755,8 +3755,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();

std::vector<std::pair<int, BracketItem*>> selectedBrackets;

if (!layoutAll && m->system()) {
System* system = m->system();
int systemIndex = _systems.indexOf(system);
Expand Down Expand Up @@ -3796,8 +3794,6 @@ void Score::doLayoutRange(int stick, int etick)
for (System* s : _systems) {
for (Bracket* b : s->brackets()) {
if (b->selected()) {
auto bracket = make_pair(_systems.indexOf(s), b->bracketItem());
selectedBrackets.push_back(bracket);
_selection.elements().removeOne(b);
_selection.updateState();
setSelectionChanged(true);
Expand Down Expand Up @@ -3872,20 +3868,6 @@ void Score::doLayoutRange(int stick, int etick)

for (MuseScoreView* v : viewer)
v->layoutChanged();

for (auto bracket : selectedBrackets) {
int systemIndex = bracket.first;
BracketItem* bi = bracket.second;
if (systemIndex < _systems.size()) {
System* system = _systems[systemIndex];
for (Bracket* b : system->brackets()) {
if (b->bracketItem() == bi) {
selectAdd(b);
break;
}
}
}
}
}

//---------------------------------------------------------
Expand Down