Просмотр исходного кода

- fixed issue in Gerber UI where a label was not hidden when in Basic mode
- added the color parameters of the objects to the serializable attributes

Marius Stanciu 6 лет назад
Родитель
Сommit
988b9d7dac
3 измененных файлов с 7 добавлено и 4 удалено
  1. 3 3
      FlatCAMApp.py
  2. 2 1
      FlatCAMObj.py
  3. 2 0
      README.md

+ 3 - 3
FlatCAMApp.py

@@ -12397,13 +12397,13 @@ class App(QtCore.QObject):
                         str(hex(self.ui.general_defaults_form.general_gui_group.pf_color_alpha_slider.value())[2:])
 
         new_line_color = new_color[:-2]
+        sel_obj.fill_color = new_color
+        sel_obj.outline_color = new_line_color
+
         sel_obj.shapes.redraw(
             update_colors=(new_color, new_line_color)
         )
 
-        sel_obj.fill_color = new_color
-        sel_obj.outline_color = new_line_color
-
     def on_grid_snap_triggered(self, state):
         if state:
             self.ui.snap_infobar_label.setPixmap(QtGui.QPixmap(self.resource_location + '/snap_filled_16.png'))

+ 2 - 1
FlatCAMObj.py

@@ -660,7 +660,7 @@ class FlatCAMGerber(FlatCAMObj, Gerber):
         # Attributes to be included in serialization
         # Always append to it because it carries contents
         # from predecessors.
-        self.ser_attrs += ['options', 'kind']
+        self.ser_attrs += ['options', 'kind', 'fill_color', 'outline_color']
 
     def set_ui(self, ui):
         """
@@ -744,6 +744,7 @@ class FlatCAMGerber(FlatCAMObj, Gerber):
             self.ui.aperture_table_visibility_cb.hide()
             self.ui.milling_type_label.hide()
             self.ui.milling_type_radio.hide()
+            self.ui.iso_type_label.hide()
             self.ui.iso_type_radio.hide()
 
             self.ui.follow_cb.hide()

+ 2 - 0
README.md

@@ -12,6 +12,8 @@ CAD program, and create G-Code for Isolation routing.
 22.12.2019
 
 - added a new option for the Gerber objects: on the project context menu now can be chosen a color for the selected Gerber object
+- fixed issue in Gerber UI where a label was not hidden when in Basic mode
+- added the color parameters of the objects to the serializable attributes
 
 21.12.2019