Revert "Avoid deadlock of ClosedDocs and SpriteObserver"

This reverts commit 8c902dd8fc7298bac78150eb2c04e440cb8dca6b.
This commit is contained in:
David Capello 2021-10-19 11:56:36 -03:00
parent 37a1b4bb84
commit 246b1930f4

View File

@ -169,6 +169,14 @@ public:
doc()->add_observer(this);
}
~SpriteEvents() {
if (m_observingUndo) {
doc()->undoHistory()->remove_observer(this);
m_observingUndo = false;
}
doc()->remove_observer(this);
}
EventType eventType(const char* eventName) const {
if (std::strcmp(eventName, "change") == 0)
return Change;