Moved emission of ElementDeleteEvent till after the relaltionships are unkinked.

Now when undoing/redoing, the order of events in correct and reproducable.
This commit is contained in:
Arjan Molenaar 2010-02-13 20:48:23 +01:00
parent 3967a5da9e
commit 0062d6415d

View File

@ -92,10 +92,10 @@ class Element(object):
"""
# Uses a mutex to make sure it is not called recursively
if self.__in_unlink.testandset():
component.handle(ElementDeleteEvent(self._factory, self))
try:
for prop in self.umlproperties():
prop.unlink(self)
component.handle(ElementDeleteEvent(self._factory, self))
finally:
self.__in_unlink.unlock()