- updated the GUI fields for the Scale and Offset in the Object UI to allow only numeric values and operators in the list [/,*,+,-], spaces, dots and comma

This commit is contained in:
Marius Stanciu
2020-05-25 03:37:34 +03:00
committed by Marius
parent 84ffa68cb0
commit 5f81d415a0
4 changed files with 20 additions and 3 deletions

View File

@@ -252,7 +252,7 @@ class FlatCAMObj(QtCore.QObject):
def on_scale_button_click(self):
self.read_form()
try:
factor = float(eval(self.ui.scale_entry.get_value()))
factor = float(self.ui.scale_entry.get_value())
except Exception as e:
self.app.inform.emit('[ERROR_NOTCL] %s' % _("Scaling could not be executed."))
log.debug("FlatCAMObj.on_scale_button_click() -- %s" % str(e))