Quellcode durchsuchen

Mark color changes as dirty

Since global colors are stored as well, mark state as dirty when present.
Michael Pitidis vor 13 Jahren
Ursprung
Commit
bc61a0979e
1 geänderte Dateien mit 2 neuen und 0 gelöschten Zeilen
  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()