فهرست منبع

BF: BoolParamWidget didn't set the default

Benjamin Poldrack 1 سال پیش
والد
کامیت
9a1d4502c8
1فایلهای تغییر یافته به همراه4 افزوده شده و 0 حذف شده
  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
         # convert to bool
         return state == Qt.Checked
         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):
 class StrParamWidget(QLineEdit, GooeyParamWidgetMixin):
     def _set_gooey_param_value(self, value):
     def _set_gooey_param_value(self, value):