From 33f01ecb836f9bd70447fcd7ab0f7eda27d224db Mon Sep 17 00:00:00 2001 From: Matthias Melcher Date: Tue, 1 Nov 2022 20:45:31 +0100 Subject: Added Fl_Group::on_insert/on_remove/on_move (#527) --- src/Fl_Flex.cxx | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/Fl_Flex.cxx') 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); -- cgit v1.2.3