Browse Source

BF: BoolParamWidget didn't set the default

Benjamin Poldrack 1 year ago
parent
commit
9a1d4502c8
1 changed files with 4 additions and 0 deletions
  1. 4 0
      datalad_gooey/param_widgets.py

+ 4 - 0
datalad_gooey/param_widgets.py

@@ -278,6 +278,10 @@ class BoolParamWidget(QCheckBox, GooeyParamWidgetMixin):
         # convert to bool
         return state == Qt.Checked
 
+    def set_gooey_param_spec(self, name: str, default=_NoValue):
+        super().set_gooey_param_spec(name, default)
+        self._set_gooey_param_value(default)
+
 
 class StrParamWidget(QLineEdit, GooeyParamWidgetMixin):
     def _set_gooey_param_value(self, value):