From e8b9555a9475e6282727c54f9166d7b1c13d3f56 Mon Sep 17 00:00:00 2001 From: Marius Stanciu Date: Sun, 10 Feb 2019 22:55:51 +0200 Subject: [PATCH] - added a strong focus to the object_name entry in the Selected tab - the keypad keyPressed are now detected correctly --- FlatCAMApp.py | 2 +- FlatCAMGUI.py | 7 +++---- ObjectUI.py | 2 ++ README.md | 2 ++ 4 files changed, 8 insertions(+), 5 deletions(-) diff --git a/FlatCAMApp.py b/FlatCAMApp.py index c0196a72..2fb7ff10 100644 --- a/FlatCAMApp.py +++ b/FlatCAMApp.py @@ -93,7 +93,7 @@ class App(QtCore.QObject): # Version version = 8.909 - version_date = "2019/02/10" + version_date = "2019/02/12" beta = True # current date now diff --git a/FlatCAMGUI.py b/FlatCAMGUI.py index e5f787d2..bf5e1d60 100644 --- a/FlatCAMGUI.py +++ b/FlatCAMGUI.py @@ -1680,7 +1680,7 @@ class FlatCAMGUI(QtWidgets.QMainWindow): if key == QtCore.Qt.Key_F10 or key == 'F10': self.app.on_fullscreen() return - else: + elif modifiers == QtCore.Qt.NoModifier: # Open Manual if key == QtCore.Qt.Key_F1 or key == 'F1': webbrowser.open(self.app.manual_url) @@ -1824,7 +1824,7 @@ class FlatCAMGUI(QtWidgets.QMainWindow): pass elif modifiers == QtCore.Qt.AltModifier: pass - else: + elif modifiers == QtCore.Qt.NoModifier: # toggle display of Notebook area if key == QtCore.Qt.Key_QuoteLeft or key == '`': self.app.on_toggle_notebook() @@ -2036,7 +2036,6 @@ class FlatCAMGUI(QtWidgets.QMainWindow): # Show Shortcut list if key == 'F3': self.app.on_shortcut_list() - elif self.app.call_source == 'exc_editor': if modifiers == QtCore.Qt.ControlModifier: # save (update) the current geometry and return to the App @@ -2053,7 +2052,7 @@ class FlatCAMGUI(QtWidgets.QMainWindow): pass elif modifiers == QtCore.Qt.AltModifier: pass - else: + elif modifiers == QtCore.Qt.NoModifier: # Abort the current action if key == QtCore.Qt.Key_Escape or key == 'Escape': # TODO: ...? diff --git a/ObjectUI.py b/ObjectUI.py index 54e97c42..bad4575e 100644 --- a/ObjectUI.py +++ b/ObjectUI.py @@ -4,6 +4,7 @@ from GUIElements import FCEntry, FloatEntry, EvalEntry, FCCheckBox, FCTable, \ LengthEntry, FCTextArea, IntEntry, RadioSet, OptionalInputSection, FCComboBox, FloatEntry2, EvalEntry2 from camlib import Excellon + class ObjectUI(QtWidgets.QWidget): """ 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_entry = FCEntry() self.name_box.addWidget(self.name_entry) + self.name_entry.setFocusPolicy(QtCore.Qt.StrongFocus) ## Box box for custom widgets # This gets populated in offspring implementations. diff --git a/README.md b/README.md index 2a4595a1..840f3043 100644 --- a/README.md +++ b/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. - 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 +- added a strong focus to the object_name entry in the Selected tab +- the keypad keyPressed are now detected correctly 9.02.2019