summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--dw/fltkcomplexbutton.cc7
-rw-r--r--dw/fltkcomplexbutton.hh1
2 files changed, 8 insertions, 0 deletions
diff --git a/dw/fltkcomplexbutton.cc b/dw/fltkcomplexbutton.cc
index 3ef50238..e1427a9e 100644
--- a/dw/fltkcomplexbutton.cc
+++ b/dw/fltkcomplexbutton.cc
@@ -176,3 +176,10 @@ ComplexButton::ComplexButton(int X, int Y, int W, int H, const char *L)
set_flag(SHORTCUT_LABEL);
}
+ComplexButton::~ComplexButton() {
+ /*
+ * The Fl_Group destructor clear()s the children, but layout expects
+ * the flat view to be around until it deletes if.
+ */
+ remove(0);
+}
diff --git a/dw/fltkcomplexbutton.hh b/dw/fltkcomplexbutton.hh
index 6e29b6c2..6266694a 100644
--- a/dw/fltkcomplexbutton.hh
+++ b/dw/fltkcomplexbutton.hh
@@ -57,6 +57,7 @@ public:
virtual int handle(int);
ComplexButton(int X, int Y, int W, int H, const char *L = 0);
+ ~ComplexButton();
int value(int v);