def undo(): apply_me = list(undo_list) del undo_list[:] apply_me.reverse() for e in apply_me: state.saveapply(*e) redo_list[:] = undo_list[:] del undo_list[:]
def _gaphas_undo_handler(self, event): self.add_undo_action(lambda: state.saveapply(*event))
def _gaphas_event_handler(self,event): try: self._current_transaction.add(lambda: saveapply(*event)); #print event except Exception as e: pass
def _gaphas_event_handler(self, event): try: self._current_transaction.add(lambda: saveapply(*event)) #print event except Exception as e: pass
def _gaphas_undo_handler(self, event): self.add_undo_action(lambda: state.saveapply(*event));