Skip to content

Commit

Permalink
fix #21099: don't delete auto generated elements immediately
Browse files Browse the repository at this point in the history
Before PR #20367, we only deleted them when the user closed the score and the undo stack got cleared
Now, they will be deleted along with the dummy element when closing the score
  • Loading branch information
RomanPudashkin committed Jan 22, 2024
1 parent b58b28c commit 56ca0f5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/engraving/dom/score.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1734,7 +1734,8 @@ void Score::doUndoRemoveElement(EngravingItem* element)
{
if (element->generated()) {
removeElement(element);
element->deleteLater();
//! HACK: don't delete as it may still be used in Inspector
// element->deleteLater();
} else {
undo(new RemoveElement(element));
}
Expand Down

0 comments on commit 56ca0f5

Please sign in to comment.