Browse Source

Mark color changes as dirty

Since global colors are stored as well, mark state as dirty when present.
Michael Pitidis 13 năm trước cách đây
mục cha
commit
bc61a0979e
1 tập tin đã thay đổi với 2 bổ sung0 xóa
  1. 2 0
      labelme.py

+ 2 - 0
labelme.py

@@ -603,6 +603,7 @@ class MainWindow(QMainWindow, WindowMixin):
             # Change the color for all shape lines:
             Shape.line_color = self.lineColor
             self.canvas.update()
+            self.setDirty()
 
     def chooseColor2(self):
        color = self.colorDialog.getColor(self.fillColor, u'Choose fill color',
@@ -611,6 +612,7 @@ class MainWindow(QMainWindow, WindowMixin):
             self.fillColor = color
             Shape.fill_color = self.fillColor
             self.canvas.update()
+            self.setDirty()
 
     def newLabel(self):
         self.canvas.deSelectShape()