diff options
| author | ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> | 2019-12-27 12:14:26 +0100 |
|---|---|---|
| committer | ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> | 2019-12-27 12:14:26 +0100 |
| commit | 07c2ba56da4e9ca3ad8d7eb02da9faa180183a99 (patch) | |
| tree | 5ea2f3e19ab66015cafbf9fa308daceb17f06e60 | |
| parent | 35a3e7cc16f8312c5a750041adf67d2e086d059b (diff) | |
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."
| -rw-r--r-- | src/Fl_Pack.cxx | 2 |
1 files changed, 2 insertions, 0 deletions
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) { |
