Jelajahi Sumber

BF: BoolParamWidget didn't set the default

Benjamin Poldrack 1 tahun lalu
induk
melakukan
9a1d4502c8
1 mengubah file dengan 4 tambahan dan 0 penghapusan
  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):