ソースを参照

- when linked, the grid snap on Y will copy the value in grid snap on X in real time

Marius Stanciu 7 年 前
コミット
8f7d169e9c
4 ファイル変更13 行追加5 行削除
  1. 3 2
      FlatCAMApp.py
  2. 7 1
      FlatCAMEditor.py
  3. 2 2
      FlatCAMGUI.py
  4. 1 0
      README.md

+ 3 - 2
FlatCAMApp.py

@@ -93,7 +93,7 @@ class App(QtCore.QObject):
 
 
     # Version
     # Version
     version = 8.909
     version = 8.909
-    version_date = "2019/02/13"
+    version_date = "2019/02/15"
     beta = True
     beta = True
 
 
     # current date now
     # current date now
@@ -4105,6 +4105,7 @@ class App(QtCore.QObject):
 
 
     def set_grid(self):
     def set_grid(self):
         self.ui.grid_gap_x_entry.setText(self.sender().text())
         self.ui.grid_gap_x_entry.setText(self.sender().text())
+        self.ui.grid_gap_y_entry.setText(self.sender().text())
 
 
     def on_grid_add(self):
     def on_grid_add(self):
         ## Current application units in lower Case
         ## Current application units in lower Case
@@ -4159,7 +4160,7 @@ class App(QtCore.QObject):
                     "[success] Grid Value deleted ...")
                     "[success] Grid Value deleted ...")
         else:
         else:
             self.inform.emit(
             self.inform.emit(
-                "[WARNING_NOTCL] Adding New Grid cancelled ...")
+                "[WARNING_NOTCL] Delete Grid value cancelled ...")
 
 
     def on_shortcut_list(self):
     def on_shortcut_list(self):
         self.report_usage("on_shortcut_list()")
         self.report_usage("on_shortcut_list()")

+ 7 - 1
FlatCAMEditor.py

@@ -2079,9 +2079,15 @@ class FlatCAMGeoEditor(QtCore.QObject):
                 log.debug("FlatCAMGeoEditor.__init__().entry2option() --> %s" % str(e))
                 log.debug("FlatCAMGeoEditor.__init__().entry2option() --> %s" % str(e))
                 return
                 return
 
 
+        def gridx_changed(goption, gentry):
+            entry2option(option=goption, entry=gentry)
+            # if the grid link is checked copy the value in the GridX field to GridY
+            if self.app.ui.grid_gap_link_cb.isChecked():
+                self.app.ui.grid_gap_y_entry.set_value(self.app.ui.grid_gap_x_entry.get_value())
+
         self.app.ui.grid_gap_x_entry.setValidator(QtGui.QDoubleValidator())
         self.app.ui.grid_gap_x_entry.setValidator(QtGui.QDoubleValidator())
         self.app.ui.grid_gap_x_entry.textChanged.connect(
         self.app.ui.grid_gap_x_entry.textChanged.connect(
-            lambda: entry2option("global_gridx", self.app.ui.grid_gap_x_entry))
+            lambda: gridx_changed("global_gridx", self.app.ui.grid_gap_x_entry))
 
 
         self.app.ui.grid_gap_y_entry.setValidator(QtGui.QDoubleValidator())
         self.app.ui.grid_gap_y_entry.setValidator(QtGui.QDoubleValidator())
         self.app.ui.grid_gap_y_entry.textChanged.connect(
         self.app.ui.grid_gap_y_entry.textChanged.connect(

+ 2 - 2
FlatCAMGUI.py

@@ -1188,8 +1188,8 @@ class FlatCAMGUI(QtWidgets.QMainWindow):
         self.popmenu_disable = self.popMenu.addAction(QtGui.QIcon('share/clear_plot32.png'), "Disable")
         self.popmenu_disable = self.popMenu.addAction(QtGui.QIcon('share/clear_plot32.png'), "Disable")
         self.popMenu.addSeparator()
         self.popMenu.addSeparator()
         self.cmenu_newmenu = self.popMenu.addMenu(QtGui.QIcon('share/file32.png'), "New")
         self.cmenu_newmenu = self.popMenu.addMenu(QtGui.QIcon('share/file32.png'), "New")
-        self.popmenu_new_geo = self.cmenu_newmenu.addAction(QtGui.QIcon('share/new_geo32_bis.png'), "Geo Obj")
-        self.popmenu_new_exc = self.cmenu_newmenu.addAction(QtGui.QIcon('share/new_exc32.png'), "Exc. Obj")
+        self.popmenu_new_geo = self.cmenu_newmenu.addAction(QtGui.QIcon('share/new_geo32_bis.png'), "Geometry")
+        self.popmenu_new_exc = self.cmenu_newmenu.addAction(QtGui.QIcon('share/new_exc32.png'), "Excellon")
         self.cmenu_newmenu.addSeparator()
         self.cmenu_newmenu.addSeparator()
         self.popmenu_new_prj = self.cmenu_newmenu.addAction(QtGui.QIcon('share/file16.png'), "Project")
         self.popmenu_new_prj = self.cmenu_newmenu.addAction(QtGui.QIcon('share/file16.png'), "Project")
         self.popMenu.addSeparator()
         self.popMenu.addSeparator()

+ 1 - 0
README.md

@@ -15,6 +15,7 @@ CAD program, and create G-Code for Isolation routing.
 - added 'FlatCAM ' prefix to any detached tab, for easy identification
 - added 'FlatCAM ' prefix to any detached tab, for easy identification
 - remade the Grids context menu (right mouse button click on canvas). Now it has values linked to the units type (inch or mm). Added ability to add or delete grid values and they are persistent.
 - remade the Grids context menu (right mouse button click on canvas). Now it has values linked to the units type (inch or mm). Added ability to add or delete grid values and they are persistent.
 - updated the function for the project context menu 'Generate CNC' menu entry (Action) to use the modernized function FlatCAMObj.FlatCAMGeometry.on_generatecnc_button_click()
 - updated the function for the project context menu 'Generate CNC' menu entry (Action) to use the modernized function FlatCAMObj.FlatCAMGeometry.on_generatecnc_button_click()
+- when linked, the grid snap on Y will copy the value in grid snap on X in real time
 
 
 13.02.2019
 13.02.2019