Пример #1
0
 def redo(self):
     layer = self.doc.layers[self.layer_idx]
     if self.ignore_first_redo:
         # these are typically created interactively, after
         # the entire layer has been moved
         self.ignore_first_redo = False
     else:
         layer.translate(self.dx, self.dy)
     self._notify_canvas_observers([layer])
     self._notify_document_observers()
Пример #2
0
 def redo(self):
     layer = self.doc.layers[self.layer_idx]
     if self.ignore_first_redo:
         # these are typically created interactively, after
         # the entire layer has been moved
         self.ignore_first_redo = False
     else:
         layer.translate(self.dx, self.dy)
     self._notify_canvas_observers([layer])
     self._notify_document_observers()
Пример #3
0
 def move_current_layer(self, dx, dy):
     layer = self.layers[self.layer_idx]
     layer.translate(dx, dy)
Пример #4
0
 def move_current_layer(self, dx, dy):
     layer = self.layers[self.layer_idx]
     layer.translate(dx, dy)
Пример #5
0
 def undo(self):
     layer = self.doc.layers[self.layer_idx]
     layer.translate(-self.dx, -self.dy)
     self._notify_canvas_observers([layer])
     self._notify_document_observers()
Пример #6
0
 def undo(self):
     layer = self.doc.layers[self.layer_idx]
     layer.translate(-self.dx, -self.dy)
     self._notify_canvas_observers([layer])
     self._notify_document_observers()