changeset 1837:5e2048737b54

Fl_Group::resize() before adjustScrollbarsAndGadgetsAllocation()
author Johannes Hofmann <Johannes.Hofmann@gmx.de>
date Sun, 16 Jan 2011 22:04:09 +0100
parents 879c110ecb57
children d93c6f5e65ac
files dw/fltkviewport.cc
diffstat 1 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/dw/fltkviewport.cc	Sun Jan 16 00:17:55 2011 +0000
+++ b/dw/fltkviewport.cc	Sun Jan 16 22:04:09 2011 +0100
@@ -145,11 +145,13 @@
 
 void FltkViewport::resize(int X, int Y, int W, int H) 
 {
-   if (W != w() || H != h()) {
+   bool dimension_changed = W != w() || H != h();
+
+   Fl_Group::resize(X, Y, W, H);
+   if (dimension_changed) {
       theLayout->viewportSizeChanged (this, W, H);
       adjustScrollbarsAndGadgetsAllocation ();
    }
-   Fl_Group::resize(X, Y, W, H);
 }
 
 void FltkViewport::draw_area (void *data, int x, int y, int w, int h)