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

- fixed bug in Geometry Editor, in disconnect_canvas_event_handlers() where I left some part of code without adding a try - except block which was required
- RELEASE 8.95

Marius Stanciu 6 лет назад
Родитель
Сommit
d8937b82fc
2 измененных файлов с 39 добавлено и 8 удалено
  1. 1 0
      README.md
  2. 38 8
      flatcamEditors/FlatCAMGeoEditor.py

+ 1 - 0
README.md

@@ -17,6 +17,7 @@ CAD program, and create G-Code for Isolation routing.
 - another fix (final one) for the Exception generated by the annotations set not to show in Preferences
 - another fix (final one) for the Exception generated by the annotations set not to show in Preferences
 - updated translations and changed version
 - updated translations and changed version
 - fixed installer issue for the x64 version due of the used CX_FREEZE python package which was in unofficial version (obviously not ready to be used)
 - fixed installer issue for the x64 version due of the used CX_FREEZE python package which was in unofficial version (obviously not ready to be used)
+- fixed bug in Geometry Editor, in disconnect_canvas_event_handlers() where I left some part of code without adding a try - except block which was required
 - RELEASE 8.95
 - RELEASE 8.95
 
 
 17.08.2019
 17.08.2019

+ 38 - 8
flatcamEditors/FlatCAMGeoEditor.py

@@ -3352,14 +3352,41 @@ class FlatCAMGeoEditor(QtCore.QObject):
         except (TypeError, AttributeError):
         except (TypeError, AttributeError):
             pass
             pass
 
 
-        self.app.ui.draw_circle.triggered.disconnect()
-        self.app.ui.draw_poly.triggered.disconnect()
-        self.app.ui.draw_arc.triggered.disconnect()
+        try:
+            self.app.ui.draw_circle.triggered.disconnect()
+        except (TypeError, AttributeError):
+            pass
+
+        try:
+            self.app.ui.draw_poly.triggered.disconnect()
+        except (TypeError, AttributeError):
+            pass
+
+        try:
+            self.app.ui.draw_arc.triggered.disconnect()
+        except (TypeError, AttributeError):
+            pass
+
+
+        try:
+            self.app.ui.draw_text.triggered.disconnect()
+        except (TypeError, AttributeError):
+            pass
+
+        try:
+            self.app.ui.draw_buffer.triggered.disconnect()
+        except (TypeError, AttributeError):
+            pass
 
 
-        self.app.ui.draw_text.triggered.disconnect()
-        self.app.ui.draw_buffer.triggered.disconnect()
-        self.app.ui.draw_paint.triggered.disconnect()
-        self.app.ui.draw_eraser.triggered.disconnect()
+        try:
+            self.app.ui.draw_paint.triggered.disconnect()
+        except (TypeError, AttributeError):
+            pass
+
+        try:
+            self.app.ui.draw_eraser.triggered.disconnect()
+        except (TypeError, AttributeError):
+            pass
 
 
         try:
         try:
             self.app.ui.draw_union.triggered.disconnect(self.union)
             self.app.ui.draw_union.triggered.disconnect(self.union)
@@ -3376,7 +3403,10 @@ class FlatCAMGeoEditor(QtCore.QObject):
         except (TypeError, AttributeError):
         except (TypeError, AttributeError):
             pass
             pass
 
 
-        self.app.ui.draw_transform.triggered.disconnect()
+        try:
+            self.app.ui.draw_transform.triggered.disconnect()
+        except (TypeError, AttributeError):
+            pass
 
 
     def add_shape(self, shape):
     def add_shape(self, shape):
         """
         """