Browse Source

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."
pull/108/head
ManoloFLTK 6 years ago
parent
commit
07c2ba56da
  1. 2
      src/Fl_Pack.cxx

2
src/Fl_Pack.cxx

@ -135,6 +135,8 @@ void Fl_Pack::draw() { @@ -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) {

Loading…
Cancel
Save