- if trying to add a tool using shortcut key 'T' with value zero the app will react with a message telling to use a non-zero value.

This commit is contained in:
Marius Stanciu
2019-02-09 01:18:03 +02:00
committed by Marius S
parent 8f000c0a18
commit da7029dc0b
4 changed files with 20 additions and 10 deletions

View File

@@ -93,7 +93,7 @@ class App(QtCore.QObject):
# Version
version = 8.908
version_date = "2019/02/7"
version_date = "2019/02/9"
beta = True
# current date now
@@ -2753,9 +2753,11 @@ class App(QtCore.QObject):
val, ok = tool_add_popup.get_value()
if ok:
if float(val) == 0:
self.inform.emit(
"[WARNING_NOTCL] Please enter a tool diameter with non-zero value, in Float format.")
return
self.collection.get_active().on_tool_add(dia=float(val))
self.inform.emit(
"[success]Added new tool with dia: %s %s" % ('%.4f' % float(val), str(self.units)))
else:
self.inform.emit(
"[WARNING_NOTCL] Adding Tool cancelled ...")
@@ -2771,9 +2773,11 @@ class App(QtCore.QObject):
val, ok = tool_add_popup.get_value()
if ok:
if float(val) == 0:
self.inform.emit(
"[WARNING_NOTCL] Please enter a tool diameter with non-zero value, in Float format.")
return
self.ncclear_tool.on_tool_add(dia=float(val))
self.inform.emit(
"[success]Added new tool with dia: %s %s" % ('%.4f' % float(val), str(self.units)))
else:
self.inform.emit(
"[WARNING_NOTCL] Adding Tool cancelled ...")
@@ -2786,9 +2790,11 @@ class App(QtCore.QObject):
val, ok = tool_add_popup.get_value()
if ok:
if float(val) == 0:
self.inform.emit(
"[WARNING_NOTCL] Please enter a tool diameter with non-zero value, in Float format.")
return
self.paint_tool.on_tool_add(dia=float(val))
self.inform.emit(
"[success]Added new tool with dia: %s %s" % ('%.4f' % float(val), str(self.units)))
else:
self.inform.emit(
"[WARNING_NOTCL] Adding Tool cancelled ...")