Skip to content

Fix issue when setting compact mode before model

Carlos Pascual requested to merge github/fork/cpascual/fixcompact into develop

Commit 86b79ea0 introduced a bug: the compact mode cannot be set unless the model is set. This causes issues e.g. when loading a configuration of a TaurusForm in which the form compact mode was set to True.

The problem is due to an exception in TaurusValue.readWidget() and can be reproduced with the following snippet:

app = TaurusApplication(cmd_line_parser=None)
w = TaurusForm()
w.setCompact(True)
w.setModel(['sys/tg_test/1/float_scalar'])
w.show()
sys.exit(app.exec_())

Make TaurusValue.readWidget() more robust.

Merge request reports

Loading