- 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

@@ -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(