Fix error messages about locked sprite when deleting multiple cels (fix #4204)

This is a combination when we modify a layer property and then
modify/delete several cels/frames/layers.
This commit is contained in:
David Capello 2023-12-06 12:47:52 -03:00
parent 01c69a4cf7
commit abba4684a7
2 changed files with 12 additions and 0 deletions

View File

@ -287,6 +287,7 @@ private:
update_screen_for_document(m_document);
}
// TODO this is similar to LayerPropertiesWindow::onCommitChange()
m_pendingChanges = false;
}

View File

@ -308,6 +308,17 @@ private:
update_screen_for_document(m_document);
}
// We indicate that there are no more pending changes in both
// cases 1) if we were able to commit the transaction or 2) if an
// exception ocurred (e.g. the sprite was locked). This is because
// sometimes if a big operation with multiple modifications
// (e.g. deleting a lot of cels at the same time) is going to
// happen, we'll receive a lot of onActiveSiteChange() events +
// onCommitChange() calls.
//
// TODO this is similar to CelPropertiesWindow::onCommitChange()
m_pendingChanges = false;
}
// ContextObserver impl