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
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
The text was updated successfully, but these errors were encountered:
Context: I ran
start_test_app
on an instance of a custom driver which contained aDictFeat
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 aDictFeatWidget
, which doesn't have avalue_to_feat
method. As a result, whenDriverTestWidget.update_on_change()
runswidget._widget._update_on_change = new_state
, the_update_on_change
property ofDictFeatWidget
is updated instead of the_update_on_change property
ofDictFeatWidget._value_widget
.Probable fix: add an
if isinstance(widget._widget, DictFeatWidget)
statement toDriverTestWidget.update_on_change()
Proposed fix: rewrite
DriverTestWidget.update_on_change()
asThe text was updated successfully, but these errors were encountered: