Explorar o código

- added a strong focus to the object_name entry in the Selected tab
- the keypad keyPressed are now detected correctly

Marius Stanciu %!s(int64=7) %!d(string=hai) anos
pai
achega
e8b9555a94
Modificáronse 4 ficheiros con 8 adicións e 5 borrados
  1. 1 1
      FlatCAMApp.py
  2. 3 4
      FlatCAMGUI.py
  3. 2 0
      ObjectUI.py
  4. 2 0
      README.md

+ 1 - 1
FlatCAMApp.py

@@ -93,7 +93,7 @@ class App(QtCore.QObject):
 
 
     # Version
     # Version
     version = 8.909
     version = 8.909
-    version_date = "2019/02/10"
+    version_date = "2019/02/12"
     beta = True
     beta = True
 
 
     # current date now
     # current date now

+ 3 - 4
FlatCAMGUI.py

@@ -1680,7 +1680,7 @@ class FlatCAMGUI(QtWidgets.QMainWindow):
                 if key == QtCore.Qt.Key_F10 or key == 'F10':
                 if key == QtCore.Qt.Key_F10 or key == 'F10':
                     self.app.on_fullscreen()
                     self.app.on_fullscreen()
                     return
                     return
-            else:
+            elif modifiers == QtCore.Qt.NoModifier:
                 # Open Manual
                 # Open Manual
                 if key == QtCore.Qt.Key_F1 or key == 'F1':
                 if key == QtCore.Qt.Key_F1 or key == 'F1':
                     webbrowser.open(self.app.manual_url)
                     webbrowser.open(self.app.manual_url)
@@ -1824,7 +1824,7 @@ class FlatCAMGUI(QtWidgets.QMainWindow):
                 pass
                 pass
             elif modifiers == QtCore.Qt.AltModifier:
             elif modifiers == QtCore.Qt.AltModifier:
                 pass
                 pass
-            else:
+            elif modifiers == QtCore.Qt.NoModifier:
                 # toggle display of Notebook area
                 # toggle display of Notebook area
                 if key == QtCore.Qt.Key_QuoteLeft or key == '`':
                 if key == QtCore.Qt.Key_QuoteLeft or key == '`':
                     self.app.on_toggle_notebook()
                     self.app.on_toggle_notebook()
@@ -2036,7 +2036,6 @@ class FlatCAMGUI(QtWidgets.QMainWindow):
                 # Show Shortcut list
                 # Show Shortcut list
                 if key == 'F3':
                 if key == 'F3':
                     self.app.on_shortcut_list()
                     self.app.on_shortcut_list()
-
         elif self.app.call_source == 'exc_editor':
         elif self.app.call_source == 'exc_editor':
             if modifiers == QtCore.Qt.ControlModifier:
             if modifiers == QtCore.Qt.ControlModifier:
                 # save (update) the current geometry and return to the App
                 # save (update) the current geometry and return to the App
@@ -2053,7 +2052,7 @@ class FlatCAMGUI(QtWidgets.QMainWindow):
                 pass
                 pass
             elif modifiers == QtCore.Qt.AltModifier:
             elif modifiers == QtCore.Qt.AltModifier:
                 pass
                 pass
-            else:
+            elif modifiers == QtCore.Qt.NoModifier:
                 # Abort the current action
                 # Abort the current action
                 if key == QtCore.Qt.Key_Escape or key == 'Escape':
                 if key == QtCore.Qt.Key_Escape or key == 'Escape':
                     # TODO: ...?
                     # TODO: ...?

+ 2 - 0
ObjectUI.py

@@ -4,6 +4,7 @@ from GUIElements import FCEntry, FloatEntry, EvalEntry, FCCheckBox, FCTable, \
     LengthEntry, FCTextArea, IntEntry, RadioSet, OptionalInputSection, FCComboBox, FloatEntry2, EvalEntry2
     LengthEntry, FCTextArea, IntEntry, RadioSet, OptionalInputSection, FCComboBox, FloatEntry2, EvalEntry2
 from camlib import Excellon
 from camlib import Excellon
 
 
+
 class ObjectUI(QtWidgets.QWidget):
 class ObjectUI(QtWidgets.QWidget):
     """
     """
     Base class for the UI of FlatCAM objects. Deriving classes should
     Base class for the UI of FlatCAM objects. Deriving classes should
@@ -38,6 +39,7 @@ class ObjectUI(QtWidgets.QWidget):
         self.name_box.addWidget(name_label)
         self.name_box.addWidget(name_label)
         self.name_entry = FCEntry()
         self.name_entry = FCEntry()
         self.name_box.addWidget(self.name_entry)
         self.name_box.addWidget(self.name_entry)
+        self.name_entry.setFocusPolicy(QtCore.Qt.StrongFocus)
 
 
         ## Box box for custom widgets
         ## Box box for custom widgets
         # This gets populated in offspring implementations.
         # This gets populated in offspring implementations.

+ 2 - 0
README.md

@@ -16,6 +16,8 @@ CAD program, and create G-Code for Isolation routing.
 - repurposed shortcut key 'Delete' to delete tools in tooltable when the mouse is over the Seleted tab (with Geometry inside) or in Tools tab (when NCC Tool or Paint Tool is inside). Or in Excellon Editor when mouse is hovering the Selected tab selecting a tool, 'Delete' key will delete that tool, if on canvas 'Delete' key will delete a selected shape (drill). In rest, will delete selected objects.
 - repurposed shortcut key 'Delete' to delete tools in tooltable when the mouse is over the Seleted tab (with Geometry inside) or in Tools tab (when NCC Tool or Paint Tool is inside). Or in Excellon Editor when mouse is hovering the Selected tab selecting a tool, 'Delete' key will delete that tool, if on canvas 'Delete' key will delete a selected shape (drill). In rest, will delete selected objects.
 - adjusted the postprocessor files so the Spindle Off command (M5) is done before the move to Toolchange Z
 - adjusted the postprocessor files so the Spindle Off command (M5) is done before the move to Toolchange Z
 - adjusted the Toolchange Manual postprocessor file to have more descriptive messages on the toolchange event
 - adjusted the Toolchange Manual postprocessor file to have more descriptive messages on the toolchange event
+- added a strong focus to the object_name entry in the Selected tab
+- the keypad keyPressed are now detected correctly
 
 
 9.02.2019
 9.02.2019