From 07c2ba56da4e9ca3ad8d7eb02da9faa180183a99 Mon Sep 17 00:00:00 2001 From: ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> Date: Fri, 27 Dec 2019 12:14:26 +0100 Subject: [PATCH] Have Fl_Pack::draw() call Fl_Group::init_sizes() on its parent group. Fl_Pack::draw() sometimes resizes itself. This must be followed by a call to Fl_Group::init_sizes() as indicated in that function's doc: "If you rearrange the widgets in your group, call this method to register the new arrangement with the Fl_Group that contains them." --- src/Fl_Pack.cxx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/Fl_Pack.cxx b/src/Fl_Pack.cxx index 5935079ce..55ad2c385 100644 --- a/src/Fl_Pack.cxx +++ b/src/Fl_Pack.cxx @@ -135,6 +135,8 @@ void Fl_Pack::draw() { th += Fl::box_dh(box()); if (th <= 0) th = 1; if (tw != w() || th != h()) { Fl_Widget::resize(x(),y(),tw,th); + Fl_Group *parent = this->parent(); + if (parent) parent->init_sizes(); d = FL_DAMAGE_ALL; } if (d&FL_DAMAGE_ALL) {