You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
In case of DictFeat, DriverTestWidget.update_on_change() has no effect #66
Context: I ran start_test_app on an instance of a custom driver which contained a DictFeat and unchecked its "Update on change" checkbox. It had no effect on the behavior of the widget.
Probable origin: In case of a DictFeat, LabeledFeatWidget._widget is a DictFeatWidget, which doesn't have a value_to_feat method. As a result, when DriverTestWidget.update_on_change() runs widget._widget._update_on_change = new_state, the _update_on_change property of DictFeatWidget is updated instead of the _update_on_change property of DictFeatWidget._value_widget.
Probable fix: add an if isinstance(widget._widget, DictFeatWidget) statement to DriverTestWidget.update_on_change()
Proposed fix: rewrite DriverTestWidget.update_on_change() as
def update_on_change(self, new_state):
"""Set the 'update_on_change' flag to new_state in each writable widget
within this widget. If True, the driver will be updated after each change.
"""
for widget in self.writable_widgets:
if isinstance(widget._widget, DictFeatWidget):
widget._widget._value_widget._update_on_change = new_state
else:
widget._widget._update_on_change = new_state
Activity