diff --git a/flatcamGUI/GUIElements.py b/flatcamGUI/GUIElements.py index 18977cdf..812d8fa6 100644 --- a/flatcamGUI/GUIElements.py +++ b/flatcamGUI/GUIElements.py @@ -243,7 +243,7 @@ class FloatEntry(QtWidgets.QLineEdit): try: evaled = eval(raw) except Exception as e: - if evaled is not None: + if raw is not '': log.error("Could not evaluate val: %s, error: %s" % (str(raw), str(e))) return None @@ -286,7 +286,7 @@ class FloatEntry2(QtWidgets.QLineEdit): try: evaled = eval(raw) except Exception as e: - if evaled is not None: + if raw is not '': log.error("Could not evaluate val: %s, error: %s" % (str(raw), str(e))) return None @@ -459,7 +459,7 @@ class EvalEntry(QtWidgets.QLineEdit): try: evaled = eval(raw) except Exception as e: - if evaled is not None: + if raw is not '': log.error("Could not evaluate val: %s, error: %s" % (str(raw), str(e))) return None return evaled @@ -498,7 +498,7 @@ class EvalEntry2(QtWidgets.QLineEdit): try: evaled = eval(raw) except Exception as e: - if evaled is not None: + if raw is not '': log.error("Could not evaluate val: %s, error: %s" % (str(raw), str(e))) return None return evaled @@ -785,7 +785,7 @@ class FCInputDialog(QtWidgets.QInputDialog): def get_value(self): self.val, self.ok = self.getDouble(self, self.title, self.text, min=self.min, - max=self.max, decimals=self.decimals, value=self.init_value) + max=self.max, decimals=self.decimals, value=self.init_value) return [self.val, self.ok] # "Transform", "Enter the Angle value:" @@ -1449,7 +1449,7 @@ class FCTable(QtWidgets.QTableWidget): width += self.columnWidth(i) return width - # color is in format QtGui.Qcolor(r, g, b, alfa) with or without alfa + # color is in format QtGui.Qcolor(r, g, b, alpha) with or without alpfa def setColortoRow(self, rowIndex, color): for j in range(self.columnCount()): self.item(rowIndex, j).setBackground(color) @@ -1625,7 +1625,6 @@ class Dialog_box(QtWidgets.QWidget): self.readyToEdit = True - class _BrowserTextEdit(QTextEdit): def __init__(self, version): @@ -1641,7 +1640,6 @@ class _BrowserTextEdit(QTextEdit): clear_action.triggered.connect(self.clear) self.menu.exec_(event.globalPos()) - def clear(self): QTextEdit.clear(self) text = "FlatCAM %s (c)2014-2019 Juan Pablo Caram (Type help to get started)\n\n" % self.version diff --git a/flatcamTools/ToolCutOut.py b/flatcamTools/ToolCutOut.py index 213b7022..4d3d7695 100644 --- a/flatcamTools/ToolCutOut.py +++ b/flatcamTools/ToolCutOut.py @@ -421,10 +421,10 @@ class CutOut(FlatCAMTool): object_geo = unary_union(object_geo) - # for geo in object_geo: if isinstance(cutout_obj, FlatCAMGerber): - geo = (object_geo.buffer(margin + abs(dia / 2))).exterior + geo = object_geo.buffer(margin + abs(dia / 2)) + geo = geo.exterior else: geo = object_geo @@ -438,9 +438,9 @@ class CutOut(FlatCAMTool): if gaps == '8' or gaps == '2LR': geo = self.subtract_poly_from_geo(geo, - xmin - gapsize, # botleft_x + xmin - gapsize, # botleft_x py - gapsize + leny / 4, # botleft_y - xmax + gapsize, # topright_x + xmax + gapsize, # topright_x py + gapsize + leny / 4) # topright_y geo = self.subtract_poly_from_geo(geo, xmin - gapsize,