mirror of
https://github.com/fltk/fltk.git
synced 2026-06-01 06:14:28 +08:00
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."
This commit is contained in:
@@ -135,6 +135,8 @@ void Fl_Pack::draw() {
|
|||||||
th += Fl::box_dh(box()); if (th <= 0) th = 1;
|
th += Fl::box_dh(box()); if (th <= 0) th = 1;
|
||||||
if (tw != w() || th != h()) {
|
if (tw != w() || th != h()) {
|
||||||
Fl_Widget::resize(x(),y(),tw,th);
|
Fl_Widget::resize(x(),y(),tw,th);
|
||||||
|
Fl_Group *parent = this->parent();
|
||||||
|
if (parent) parent->init_sizes();
|
||||||
d = FL_DAMAGE_ALL;
|
d = FL_DAMAGE_ALL;
|
||||||
}
|
}
|
||||||
if (d&FL_DAMAGE_ALL) {
|
if (d&FL_DAMAGE_ALL) {
|
||||||
|
|||||||
Reference in New Issue
Block a user