DO NOT REPLY TO THIS MESSAGE.  INSTEAD, POST ANY RESPONSES TO THE LINK BELOW.

[STR New]

Link: http://www.fltk.org/str.php?L2032
Version: 1.1.9





Link: http://www.fltk.org/str.php?L2032
Version: 1.1.9
Index: src/Fl_Group.cxx
===================================================================
--- src/Fl_Group.cxx    (revision 6177)
+++ src/Fl_Group.cxx    (working copy)
@@ -463,11 +463,20 @@
 
 void Fl_Group::resize(int X, int Y, int W, int H) {
 
-  if (!resizable() || W==w() && H==h() ) {
+  int old_x = x();
+  int old_y = y();
+  int old_w = w();
+  int old_h = h();
+  
+  int *p = sizes();
 
+  Fl_Widget::resize(X,Y,W,H);
+
+  if (!resizable() || W==old_w && H==old_h ) {
+
     if (type() < FL_WINDOW) {
-      int dx = X-x();
-      int dy = Y-y();
+      int dx = X-old_x;
+      int dy = Y-old_y;
       Fl_Widget*const* a = array();
       for (int i=children_; i--;) {
        Fl_Widget* o = *a++;
@@ -477,7 +486,7 @@
 
   } else if (children_) {
 
-    int *p = sizes();
+    // int *p = sizes();
 
     // get changes in size/position from the initial size:
     int dx = X - p[0];
@@ -529,7 +538,7 @@
     }
   }
 
-  Fl_Widget::resize(X,Y,W,H);
+  // Fl_Widget::resize(X,Y,W,H); // must be done before resizing children
 }
 
 void Fl_Group::draw_children() {
_______________________________________________
fltk-bugs mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk-bugs

Reply via email to