fix #21721: Spanners not properly deleted when corresponding anchoring notes are deleted
This commit is contained in:
parent
47cd803d0f
commit
16dda8fd7f
2 changed files with 7 additions and 0 deletions
|
@ -1429,6 +1429,11 @@ void Score::cmdDeleteSelection()
|
|||
int tick2 = s2 ? s2->tick() : INT_MAX;
|
||||
int track1 = selection().staffStart() * VOICES;
|
||||
int track2 = selection().staffEnd() * VOICES;
|
||||
for (auto i : _spanner.findOverlapping(stick1, stick2 - 1)) {
|
||||
Spanner* sp = i.value;
|
||||
if (sp->track() >= track1 && sp->track() < track2)
|
||||
undoRemoveElement(sp);
|
||||
}
|
||||
for (int track = track1; track < track2; ++track) {
|
||||
Fraction f;
|
||||
int tick = -1;
|
||||
|
|
|
@ -46,6 +46,7 @@ const std::vector<Interval<Spanner*>>& SpannerMap::findContained(int start, int
|
|||
{
|
||||
if (dirty)
|
||||
update();
|
||||
results.clear();
|
||||
tree.findContained(start, stop, results);
|
||||
return results;
|
||||
}
|
||||
|
@ -58,6 +59,7 @@ const std::vector<Interval<Spanner*>>& SpannerMap::findOverlapping(int start, in
|
|||
{
|
||||
if (dirty)
|
||||
update();
|
||||
results.clear();
|
||||
tree.findOverlapping(start, stop, results);
|
||||
return results;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue