summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Melcher <github@matthiasm.com>2024-08-14 01:52:31 +0200
committerMatthias Melcher <github@matthiasm.com>2024-08-14 01:52:37 +0200
commit1badb48e714d03b8d4bc2949498abc876529b64a (patch)
treecb82def20dfdeba5d9297e784f1c9844fb9dc416
parentede61089be8d5593be0d1908d40971159cc0eab3 (diff)
FLUID: fixing unintialised widget
-rw-r--r--fluid/Fl_Widget_Type.cxx10
1 files changed, 7 insertions, 3 deletions
diff --git a/fluid/Fl_Widget_Type.cxx b/fluid/Fl_Widget_Type.cxx
index 5a54cdcd9..fe14742e1 100644
--- a/fluid/Fl_Widget_Type.cxx
+++ b/fluid/Fl_Widget_Type.cxx
@@ -1970,8 +1970,13 @@ void textcolor_menu_cb(Fl_Menu_Button* i, void* v) {
void image_spacing_cb(Fl_Value_Input* i, void* v) {
Fl_Font n; int s; Fl_Color c;
if (v == LOAD) {
- if (!current_widget->is_true_widget()) return;
- i->value(((Fl_Widget_Type*)current_widget)->o->label_image_spacing());
+ if (!current_widget->is_true_widget()) {
+ i->deactivate();
+ i->value(0);
+ } else {
+ i->activate();
+ i->value(((Fl_Widget_Type*)current_widget)->o->label_image_spacing());
+ }
} else {
int mod = 0;
s = int(i->value());
@@ -1989,7 +1994,6 @@ void image_spacing_cb(Fl_Value_Input* i, void* v) {
}
if (mod) set_modflag(1);
}
- i->value(s);
}
////////////////////////////////////////////////////////////////