fixes on secop gui

- do not display a dialog when a command returns None
- apply fmtstr, if available

Change-Id: I74da3e86e4eae9000608581e0a0f6e8c72cef715
This commit is contained in:
2021-06-04 12:23:55 +02:00
parent a771259ecf
commit 21c49df1a2
2 changed files with 9 additions and 2 deletions

View File

@ -76,7 +76,13 @@ class GenericParameterWidget(ParameterWidget):
self.setLineEdit.text())
def updateValue(self, value):
self.currentLineEdit.setText(str(value))
fmtstr = getattr(self._datatype, 'fmtstr', '%s')
if value.readerror:
value = str(value)
else:
value = fmtstr % (value.value,)
self.currentLineEdit.setText(value)
# self.currentLineEdit.setText(str(value))
class EnumParameterWidget(GenericParameterWidget):