Преглед изворни кода

- fixed the Set To Origin function when Escape was clicked

Marius Stanciu пре 7 година
родитељ
комит
4d8eefb92d
3 измењених фајлова са 8 додато и 1 уклоњено
  1. 5 0
      FlatCAMGUI.py
  2. 2 1
      FlatCAMObj.py
  3. 1 0
      README.md

+ 5 - 0
FlatCAMGUI.py

@@ -1864,6 +1864,11 @@ class FlatCAMGUI(QtWidgets.QMainWindow):
                 # Escape = Deselect All
                 # Escape = Deselect All
                 if key == QtCore.Qt.Key_Escape or key == 'Escape':
                 if key == QtCore.Qt.Key_Escape or key == 'Escape':
                     self.app.on_deselect_all()
                     self.app.on_deselect_all()
+                    # try to disconnect the slot from Set Origin
+                    try:
+                        self.app.plotcanvas.vis_disconnect('mouse_press', self.app.on_set_zero_click)
+                    except:
+                        pass
                     self.app.inform.emit("")
                     self.app.inform.emit("")
 
 
                 # Space = Toggle Active/Inactive
                 # Space = Toggle Active/Inactive

+ 2 - 1
FlatCAMObj.py

@@ -2288,7 +2288,8 @@ class FlatCAMExcellon(FlatCAMObj, Excellon):
             if self.options["solid"]:
             if self.options["solid"]:
                 for tool in self.tools:
                 for tool in self.tools:
                     for geo in self.tools[tool]['solid_geometry']:
                     for geo in self.tools[tool]['solid_geometry']:
-                        self.add_shape(shape=geo, color='#750000BF', face_color='#C40000BF', visible=self.options['plot'],
+                        self.add_shape(shape=geo, color='#750000BF', face_color='#C40000BF',
+                                       visible=self.options['plot'],
                                        layer=2)
                                        layer=2)
             else:
             else:
                 for tool in self.tools:
                 for tool in self.tools:

+ 1 - 0
README.md

@@ -19,6 +19,7 @@ CAD program, and create G-Code for Isolation routing.
 - when saving a file from Code Editor and there is no object active then the OpenFileDialog filters are reset to FlatConfig files.
 - when saving a file from Code Editor and there is no object active then the OpenFileDialog filters are reset to FlatConfig files.
 - reverted a change in GCode that might affect Gerber polarity change in Gerber parser
 - reverted a change in GCode that might affect Gerber polarity change in Gerber parser
 - ability to double click the FlatConfig files and open them in the FlatCAM Code Editor - fixed and verified
 - ability to double click the FlatConfig files and open them in the FlatCAM Code Editor - fixed and verified
+- fixed the Set To Origin function when Escape was clicked
 
 
 23.02.2019
 23.02.2019