Fix Fl_Flex unsetting of set_size()

Don't add the widget to the array if size == 0 (unset) but it has
not been in the array (or it's called twice).
This commit is contained in:
Albrecht Schlosser 2022-08-01 19:56:08 +02:00
parent f37aca15e9
commit c8565bf4f3
1 changed files with 3 additions and 0 deletions

View File

@ -287,6 +287,9 @@ void Fl_Flex::set_size(Fl_Widget *w, int size) {
return;
}
if (size == 0)
return;
// add to array of fixed size widgets
if (set_size_size_ == set_size_alloc_) {
set_size_alloc_ = alloc_size(set_size_alloc_);