- fixed a small issue with clicking in a disabled FCDoubleSpinner or FCSpinner still doing a selection

This commit is contained in:
Marius Stanciu 2019-11-03 13:33:48 +02:00 committed by Marius
parent b166b3f7dd
commit 08e740d45b
2 changed files with 15 additions and 12 deletions

View File

@ -13,6 +13,7 @@ CAD program, and create G-Code for Isolation routing.
- fixed the V-shape tool diameter calculation in NCC Tool
- in NCC Tool made the new tool dia (circular type) a parameter in Preferences
- fixed a small issue with clicking in a disabled FCDoubleSpinner or FCSpinner still doing a selection
30.10.2019

View File

@ -519,12 +519,13 @@ class FCSpinner(QtWidgets.QSpinBox):
def eventFilter(self, object, event):
if event.type() == QtCore.QEvent.MouseButtonPress:
if self.readyToEdit:
self.lineEdit().selectAll()
self.readyToEdit = False
else:
self.lineEdit().deselect()
return True
if self.isEnabled():
if self.readyToEdit:
self.lineEdit().selectAll()
self.readyToEdit = False
else:
self.lineEdit().deselect()
return True
return False
def keyPressEvent(self, event):
@ -595,12 +596,13 @@ class FCDoubleSpinner(QtWidgets.QDoubleSpinBox):
def eventFilter(self, object, event):
if event.type() == QtCore.QEvent.MouseButtonPress:
if self.readyToEdit:
self.lineEdit().selectAll()
self.readyToEdit = False
else:
self.lineEdit().deselect()
return True
if self.isEnabled():
if self.readyToEdit:
self.lineEdit().selectAll()
self.readyToEdit = False
else:
self.lineEdit().deselect()
return True
return False
def keyPressEvent(self, event):