浏览代码

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 13 年之前
父节点
当前提交
b8089c205c
共有 1 个文件被更改,包括 1 次插入5 次删除
  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