File tree 1 file changed +13
-2
lines changed
1 file changed +13
-2
lines changed Original file line number Diff line number Diff line change @@ -385,6 +385,9 @@ void NotationParts::updatePartsAndSystemObjectStaves(const mu::engraving::ScoreC
385
385
m_systemObjectStavesChanged.notify ();
386
386
}
387
387
388
+ std::vector<Staff*> removedStaves;
389
+ std::vector<Staff*> addedStaves;
390
+
388
391
for (auto & pair : range.changedItems ) {
389
392
if (!pair.first || !pair.first ->isStaff ()) {
390
393
continue ;
@@ -393,11 +396,19 @@ void NotationParts::updatePartsAndSystemObjectStaves(const mu::engraving::ScoreC
393
396
Staff* staff = toStaff (pair.first );
394
397
395
398
if (muse::contains (pair.second , CommandType::RemoveStaff)) {
396
- notifyAboutStaffRemoved (staff);
399
+ removedStaves. push_back (staff);
397
400
} else if (muse::contains (pair.second , CommandType::InsertStaff)) {
398
- notifyAboutStaffAdded (staff);
401
+ addedStaves. push_back (staff);
399
402
}
400
403
}
404
+
405
+ for (Staff* staff : removedStaves) {
406
+ notifyAboutStaffRemoved (staff);
407
+ }
408
+
409
+ for (Staff* staff: addedStaves) {
410
+ notifyAboutStaffAdded (staff);
411
+ }
401
412
}
402
413
403
414
void NotationParts::doSetScoreOrder (const ScoreOrder& order)
You can’t perform that action at this time.
0 commit comments