diff options
| author | Matthias Melcher <github@matthiasm.com> | 2022-11-01 20:45:31 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-11-01 20:45:31 +0100 |
| commit | 33f01ecb836f9bd70447fcd7ab0f7eda27d224db (patch) | |
| tree | 4f0c640c3199e34aa47962569d5eeafb930de051 /src/Fl_Flex.cxx | |
| parent | c570bd8f96902a2f290f7623b8cf3074ac8f97ca (diff) | |
Added Fl_Group::on_insert/on_remove/on_move (#527)
Diffstat (limited to 'src/Fl_Flex.cxx')
| -rw-r--r-- | src/Fl_Flex.cxx | 8 |
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); |
