示例#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()