GUI: Control Panel changes #2

Open
atse wants to merge 21 commits from gui_dev-ctrl_panel into gui_dev
Showing only changes of commit c9aa0eaab8 - Show all commits

View File

@ -91,6 +91,24 @@ class LockableUnitSpinBox(SpinBox):
super().setOpts(**opts) super().setOpts(**opts)
def editingFinishedEvent(self):
# Modified from pyqtgraph.SpinBox.editingFinishedEvent source
new_text = self.lineEdit().text()
if new_text == self.lastText:
return
try:
val = self.interpret()
except Exception:
return
if val is False:
return
if val == self.val:
self.updateText() # still update text so that values are reformatted pretty-like
return
self.setValue(val, delaySignal=False) ## allow text update so that values are reformatted pretty-like
def formatText(self, prev=None): def formatText(self, prev=None):
""" """
In addition to pyqtgraph.SpinBox's formatting, incorporate the In addition to pyqtgraph.SpinBox's formatting, incorporate the