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

This commit is contained in:
Marius Stanciu 2019-02-14 22:12:12 +02:00 committed by Marius S
parent cda10998e8
commit 8f7d169e9c
4 changed files with 13 additions and 5 deletions

View File

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

View File

@ -2079,9 +2079,15 @@ class FlatCAMGeoEditor(QtCore.QObject):
log.debug("FlatCAMGeoEditor.__init__().entry2option() --> %s" % str(e))
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.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.textChanged.connect(

View File

@ -1188,8 +1188,8 @@ class FlatCAMGUI(QtWidgets.QMainWindow):
self.popmenu_disable = self.popMenu.addAction(QtGui.QIcon('share/clear_plot32.png'), "Disable")
self.popMenu.addSeparator()
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.popmenu_new_prj = self.cmenu_newmenu.addAction(QtGui.QIcon('share/file16.png'), "Project")
self.popMenu.addSeparator()

View File

@ -15,6 +15,7 @@ CAD program, and create G-Code for Isolation routing.
- 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.
- 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