Просмотр исходного кода

- fixed a small issue in the Panelization Tool that blocked the usage of a Geometry object as panelization reference

Marius Stanciu 5 лет назад
Родитель
Сommit
fb602d6f9b
3 измененных файлов с 7 добавлено и 5 удалено
  1. 1 0
      CHANGELOG.md
  2. 4 4
      appTools/ToolCalculators.py
  3. 2 1
      app_Main.py

+ 1 - 0
CHANGELOG.md

@@ -122,6 +122,7 @@ CHANGELOG for FlatCAM beta
 27.05.2020
 27.05.2020
 
 
 - working on Isolation Tool: made to work the Isolation with multiple tools without rest machining
 - working on Isolation Tool: made to work the Isolation with multiple tools without rest machining
+- in Tool Calculators fixed an application crash if the user typed letters instead of numbers in the boxes. Now the boxes accept only numbers, dots, comma, spaces and arithmetic operators
 
 
 26.05.2020
 26.05.2020
 
 

+ 4 - 4
appTools/ToolCalculators.py

@@ -7,7 +7,7 @@
 
 
 from PyQt5 import QtWidgets
 from PyQt5 import QtWidgets
 from appTool import AppTool
 from appTool import AppTool
-from appGUI.GUIElements import FCSpinner, FCDoubleSpinner, FCEntry
+from appGUI.GUIElements import FCSpinner, FCDoubleSpinner, NumericalEvalEntry
 import math
 import math
 
 
 import gettext
 import gettext
@@ -63,13 +63,13 @@ class ToolCalculator(AppTool):
         grid_units_layout.addWidget(mm_label, 0, 0)
         grid_units_layout.addWidget(mm_label, 0, 0)
         grid_units_layout.addWidget(inch_label, 0, 1)
         grid_units_layout.addWidget(inch_label, 0, 1)
 
 
-        self.inch_entry = FCEntry()
+        self.inch_entry = NumericalEvalEntry(border_color='#0069A9')
 
 
         # self.inch_entry.setFixedWidth(70)
         # self.inch_entry.setFixedWidth(70)
         # self.inch_entry.setAlignment(QtCore.Qt.AlignRight | QtCore.Qt.AlignVCenter)
         # self.inch_entry.setAlignment(QtCore.Qt.AlignRight | QtCore.Qt.AlignVCenter)
         self.inch_entry.setToolTip(_("Here you enter the value to be converted from INCH to MM"))
         self.inch_entry.setToolTip(_("Here you enter the value to be converted from INCH to MM"))
 
 
-        self.mm_entry = FCEntry()
+        self.mm_entry = NumericalEvalEntry(border_color='#0069A9')
         # self.mm_entry.setFixedWidth(130)
         # self.mm_entry.setFixedWidth(130)
         # self.mm_entry.setAlignment(QtCore.Qt.AlignRight | QtCore.Qt.AlignVCenter)
         # self.mm_entry.setAlignment(QtCore.Qt.AlignRight | QtCore.Qt.AlignVCenter)
         self.mm_entry.setToolTip(_("Here you enter the value to be converted from MM to INCH"))
         self.mm_entry.setToolTip(_("Here you enter the value to be converted from MM to INCH"))
@@ -104,7 +104,7 @@ class ToolCalculator(AppTool):
         )
         )
         self.tipAngle_label = QtWidgets.QLabel('%s:' % _("Tip Angle"))
         self.tipAngle_label = QtWidgets.QLabel('%s:' % _("Tip Angle"))
         self.tipAngle_entry = FCSpinner(callback=self.confirmation_message_int)
         self.tipAngle_entry = FCSpinner(callback=self.confirmation_message_int)
-        self.tipAngle_entry.set_range(0,180)
+        self.tipAngle_entry.set_range(0, 180)
         self.tipAngle_entry.set_step(5)
         self.tipAngle_entry.set_step(5)
 
 
         # self.tipAngle_entry.setAlignment(QtCore.Qt.AlignRight | QtCore.Qt.AlignVCenter)
         # self.tipAngle_entry.setAlignment(QtCore.Qt.AlignRight | QtCore.Qt.AlignVCenter)

+ 2 - 1
app_Main.py

@@ -162,7 +162,8 @@ class App(QtCore.QObject):
     # ###############################################################################################################
     # ###############################################################################################################
     # ################################### Version and VERSION DATE ##################################################
     # ################################### Version and VERSION DATE ##################################################
     # ###############################################################################################################
     # ###############################################################################################################
-    version = 8.993
+    version = "Unstable Version"
+    # version = 8.993
     version_date = "2020/06/05"
     version_date = "2020/06/05"
     beta = True
     beta = True