- fixed a whole load of PyQT signal problems generated by recent changes to the usage of SpinBoxes; added a signal returnPressed for the FCSpinner and for FCDoubleSpinner

- fixed issue in Paint Tool where the first added tool was expected to have a float diameter but it was a string
- updated the translation files to the latest state in the app
This commit is contained in:
Marius Stanciu
2019-10-15 02:35:10 +03:00
committed by Marius
parent dff5b262eb
commit 5f769105bc
23 changed files with 4242 additions and 3859 deletions

View File

@@ -512,6 +512,9 @@ class EvalEntry2(QtWidgets.QLineEdit):
class FCSpinner(QtWidgets.QSpinBox):
returnPressed = pyqtSignal()
def __init__(self, parent=None):
super(FCSpinner, self).__init__(parent)
self.readyToEdit = True
@@ -528,6 +531,13 @@ class FCSpinner(QtWidgets.QSpinBox):
return True
return False
def keyPressEvent(self, event):
if event.key() == Qt.Key_Enter:
self.returnPressed.emit()
self.clearFocus()
else:
super().keyPressEvent(event)
def wheelEvent(self, *args, **kwargs):
# should work only there is a focus in the lineedit of the SpinBox
if self.readyToEdit is False:
@@ -569,6 +579,9 @@ class FCSpinner(QtWidgets.QSpinBox):
class FCDoubleSpinner(QtWidgets.QDoubleSpinBox):
returnPressed = pyqtSignal()
def __init__(self, parent=None):
super(FCDoubleSpinner, self).__init__(parent)
self.readyToEdit = True
@@ -594,6 +607,13 @@ class FCDoubleSpinner(QtWidgets.QDoubleSpinBox):
return True
return False
def keyPressEvent(self, event):
if event.key() == Qt.Key_Enter:
self.returnPressed.emit()
self.clearFocus()
else:
super().keyPressEvent(event)
def wheelEvent(self, *args, **kwargs):
# should work only there is a focus in the lineedit of the SpinBox
if self.readyToEdit is False: