summaryrefslogtreecommitdiff
path: root/src/Fl_Flex.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'src/Fl_Flex.cxx')
-rw-r--r--src/Fl_Flex.cxx8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/Fl_Flex.cxx b/src/Fl_Flex.cxx
index 74e9ed13d..446d00aea 100644
--- a/src/Fl_Flex.cxx
+++ b/src/Fl_Flex.cxx
@@ -133,6 +133,14 @@ Fl_Flex::~Fl_Flex() {
free(set_size_);
}
+/*
+ Fl_Group calls this method when a child widget is about to be removed.
+ Make sure that the widget is also removed from our fixed list.
+ */
+void Fl_Flex::on_remove(int index) {
+ set_size(child(index), 0);
+}
+
void Fl_Flex::resize(int x, int y, int w, int h) {
Fl_Widget::resize(x, y, w, h);