Browse Source

- some small fixes

Marius Stanciu 5 years ago
parent
commit
eee4595449
5 changed files with 8 additions and 6 deletions
  1. 1 0
      CHANGELOG.md
  2. 4 0
      appDatabase.py
  3. 1 0
      appTools/ToolDistance.py
  4. 2 1
      appTools/ToolDistanceMin.py
  5. 0 5
      appTools/ToolIsolation.py

+ 1 - 0
CHANGELOG.md

@@ -20,6 +20,7 @@ CHANGELOG for FlatCAM beta
 - Tool Isolation - made sure that the app can load from Tools Database only tools marked for Isolation tool
 - Tool Isolation - on Tool start it will attempt to load the Preferences set tools by diameter from Tools Database. If it can't find one there it will add a default tool.
 - in Tools: Transform, SUb, RulesCheck, DistanceMin, Distance - moved the Tool UI in its own class
+- some small fixes
 
 26.08.2020
 

+ 4 - 0
appDatabase.py

@@ -3356,6 +3356,10 @@ class ToolsDB2(QtWidgets.QWidget):
             self.app.inform.emit('[WARNING_NOTCL] %s...' % _("No Tool/row selected in the Tools Database table"))
             return
 
+        if not self.db_tool_dict:
+            self.app.inform.emit('[ERROR_NOTCL] %s' % _("Tools DB empty."))
+            return
+
         for item in self.ui.tree_widget.selectedItems():
             tool_uid = item.data(0, QtCore.Qt.DisplayRole)
 

+ 1 - 0
appTools/ToolDistance.py

@@ -547,6 +547,7 @@ class DistUI:
         self.app = app
         self.decimals = self.app.decimals
         self.layout = layout
+        self.units = self.app.defaults['units'].lower()
 
         # ## Title
         title_label = FCLabel("<font size=4><b>%s</b></font><br>" % self.toolName)

+ 2 - 1
appTools/ToolDistanceMin.py

@@ -224,8 +224,9 @@ class DistMinUI:
         self.app = app
         self.decimals = self.app.decimals
         self.layout = layout
+        self.units = self.app.defaults['units'].lower()
 
-# ## Title
+        # ## Title
         title_label = QtWidgets.QLabel("<font size=4><b>%s</b></font><br>" % self.toolName)
         self.layout.addWidget(title_label)
 

+ 0 - 5
appTools/ToolIsolation.py

@@ -1057,11 +1057,6 @@ class ToolIsolation(AppTool, Gerber):
             self.on_tool_default_add()
             return
 
-        if not tools_db_dict:
-            self.app.inform.emit('[ERROR_NOTCL] %s' % _("Tools DB empty."))
-            self.blockSignals(False)
-            return
-
         tool_found = 0
 
         offset = 'Path'