Explorar o código

- fixed re-cut length entry not staying disabled when the re-cut cb is not checked

Marius Stanciu %!s(int64=6) %!d(string=hai) anos
pai
achega
8afafedfff
Modificáronse 3 ficheiros con 8 adicións e 4 borrados
  1. 6 1
      FlatCAMObj.py
  2. 1 0
      README.md
  3. 1 3
      flatcamGUI/ObjectUI.py

+ 6 - 1
FlatCAMObj.py

@@ -3763,6 +3763,9 @@ class FlatCAMGeometry(FlatCAMObj, Geometry):
         self.ui.name_entry.set_value(self.options['name'])
         self.ui_connect()
 
+        self.ui.e_cut_entry.setDisabled(False) if self.ui.extracut_cb.get_value() else \
+            self.ui.e_cut_entry.setDisabled(True)
+
     def set_ui(self, ui):
         FlatCAMObj.set_ui(self, ui)
 
@@ -3939,7 +3942,9 @@ class FlatCAMGeometry(FlatCAMObj, Geometry):
         else:
             self.ui.level.setText('<span style="color:red;"><b>%s</b></span>' % _('Advanced'))
 
-        self.ui.e_cut_entry.setDisabled(True)
+        self.ui.e_cut_entry.setDisabled(False) if self.app.defaults['geometry_extracut'] else \
+            self.ui.e_cut_entry.setDisabled(True)
+        self.ui.extracut_cb.toggled.connect(lambda state: self.ui.e_cut_entry.setDisabled(not state))
 
         self.ui.plot_cb.stateChanged.connect(self.on_plot_cb_click)
         self.ui.generate_cnc_button.clicked.connect(self.on_generatecnc_button_click)

+ 1 - 0
README.md

@@ -15,6 +15,7 @@ CAD program, and create G-Code for Isolation routing.
 - Print function is now printing a PDF file for a selection of objects in the colors from canvas 
 - added an icon in the infobar that will show more clearly the status of the grid snapping
 - in Geometry Object UI (selected tab) when a tool type is changed from no matter what to V-shape, the cut_z value is saved and when the tool type is changed back to something different than V-shape, this saved cut-z value is restored
+- fixed re-cut length entry not staying disabled when the re-cut cb is not checked
 
 19.12.2019
 

+ 1 - 3
flatcamGUI/ObjectUI.py

@@ -1577,7 +1577,7 @@ class GeometryObjectUI(ObjectUI):
         self.cncfeedrate_rapid_entry.hide()
 
         # Cut over 1st point in path
-        self.extracut_cb = FCCheckBox('%s' % _('Re-cut'))
+        self.extracut_cb = FCCheckBox('%s:' % _('Re-cut'))
         self.extracut_cb.setToolTip(
             _("In order to remove possible\n"
               "copper leftovers where first cut\n"
@@ -1599,8 +1599,6 @@ class GeometryObjectUI(ObjectUI):
         self.grid3.addWidget(self.extracut_cb, 13, 0)
         self.grid3.addWidget(self.e_cut_entry, 13, 1)
 
-        self.ois_e_cut = OptionalInputSection(self.extracut_cb, [self.e_cut_entry])
-
         # Spindlespeed
         spdlabel = QtWidgets.QLabel('%s:' % _('Spindle speed'))
         spdlabel.setToolTip(