Explorar o código

No need to deselect, the copy is now selected

The selectionChanged signal is used only for updating the menus, but
there is still a selection after the change, there is no need for it.
Michael Pitidis %!s(int64=13) %!d(string=hai) anos
pai
achega
b8089c205c
Modificáronse 1 ficheiros con 1 adicións e 5 borrados
  1. 1 5
      canvas.py

+ 1 - 5
canvas.py

@@ -134,12 +134,9 @@ class Canvas(QWidget):
         del shape.fill_color
         del shape.line_color
         if copy:
-            self.deSelectShape()
             self.shapes.append(shape)
             self.selectedShape.selected = False
             self.selectedShape = shape
-            self.selectionChanged.emit(True)
-
         else:
             shape.label = self.selectedShape.label
             self.deleteSelected()
@@ -212,9 +209,8 @@ class Canvas(QWidget):
             self.selectedShape = None
             self.setHiding(False)
             self.repaint()
-
             self.selectionChanged.emit(False)
-            
+
     def deleteSelected(self):
         if self.selectedShape:
             shape = self.selectedShape