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

- ESC key will trigger normal view if in full screen and the ESC key is pressed

Marius Stanciu 6 лет назад
Родитель
Сommit
99c2ceaaed
2 измененных файлов с 8 добавлено и 0 удалено
  1. 1 0
      README.md
  2. 7 0
      flatcamGUI/FlatCAMGUI.py

+ 1 - 0
README.md

@@ -13,6 +13,7 @@ CAD program, and create G-Code for Isolation routing.
 
 
 - added autocomplete finish with ENTER key for the TCL Shell
 - added autocomplete finish with ENTER key for the TCL Shell
 - made sure that the autocomplete function works only for FlatCAM Scripts
 - made sure that the autocomplete function works only for FlatCAM Scripts
+- ESC key will trigger normal view if in full screen and the ESC key is pressed
 
 
 19.03.2019
 19.03.2019
 
 

+ 7 - 0
flatcamGUI/FlatCAMGUI.py

@@ -1958,6 +1958,13 @@ 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()
+
+                    # if in full screen, exit to normal view
+                    self.showNormal()
+                    self.app.restore_toolbar_view()
+                    self.splitter_left.setVisible(True)
+                    self.app.toggle_fscreen = False
+
                     # try to disconnect the slot from Set Origin
                     # try to disconnect the slot from Set Origin
                     try:
                     try:
                         self.app.plotcanvas.vis_disconnect('mouse_press', self.app.on_set_zero_click)
                         self.app.plotcanvas.vis_disconnect('mouse_press', self.app.on_set_zero_click)