Changeset 2217
- Timestamp:
- 02/13/08 02:44:26 (3 months ago)
- Files:
-
- gaphor/trunk/gaphor/diagram/association.py (modified) (1 diff)
- gaphor/trunk/gaphor/diagram/diagramitem.py (modified) (1 diff)
- gaphor/trunk/gaphor/diagram/feature.py (modified) (1 diff)
- gaphor/trunk/gaphor/services/undomanager.py (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
gaphor/trunk/gaphor/diagram/association.py
r2200 r2217 68 68 def setup_canvas(self): 69 69 super(AssociationItem, self).setup_canvas() 70 self._head_end._canvas = self.canvas71 self._tail_end._canvas = self.canvas72 70 73 71 def teardown_canvas(self): 74 72 super(AssociationItem, self).teardown_canvas() 75 del self._head_end._canvas76 del self._tail_end._canvas77 73 78 74 def save(self, save_func): gaphor/trunk/gaphor/diagram/diagramitem.py
r2210 r2217 216 216 Remove the item from the canvas and set subject to None. 217 217 """ 218 if self.canvas: 219 self.canvas.remove(self) 220 self.subject = None 218 221 super(DiagramItem, self).unlink() 219 self.subject = None220 if self.canvas:221 #try:222 self.canvas.remove(self)223 #except KeyError:224 # # Canvas was already removed225 # pass226 222 227 223 gaphor/trunk/gaphor/diagram/feature.py
r2155 r2217 25 25 self.height = 0 26 26 self.text = '' 27 # Fool unlink code :27 # Fool unlink code (attribute is not a gaphas.Item): 28 28 self.canvas = None 29 29 gaphor/trunk/gaphor/services/undomanager.py
r2210 r2217 162 162 """ 163 163 if self._current_transaction: 164 log.debug('add_undo_action: %s %s' % (self._current_transaction, action))164 #log.debug('add_undo_action: %s %s' % (self._current_transaction, action)) 165 165 self._current_transaction.add(action) 166 166 self._app.handle(UndoManagerStateChanged(self)) … … 287 287 288 288 def _gaphas_undo_handler(self, event): 289 print 'Gaphas event:', event290 289 self.add_undo_action(lambda: state.saveapply(*event)); 291 290
