[haiku-webkit-commits] r357 - webkit/trunk/WebKit/haiku/WebPositive

  • From: webkit@xxxxxxxxxxxxxxx
  • To: haiku-webkit-commits@xxxxxxxxxxxxx
  • Date: Wed, 24 Mar 2010 22:32:05 +0000

Author: stippi
Date: Wed Mar 24 22:32:04 2010
New Revision: 357
URL: http://mmlr.dyndns.org/changeset/357

Log:
Move variable declaration into proper scope and where it's first needed.

Modified:
   webkit/trunk/WebKit/haiku/WebPositive/DownloadWindow.cpp

Modified: webkit/trunk/WebKit/haiku/WebPositive/DownloadWindow.cpp
==============================================================================
--- webkit/trunk/WebKit/haiku/WebPositive/DownloadWindow.cpp    Wed Mar 24 
22:30:20 2010        (r356)
+++ webkit/trunk/WebKit/haiku/WebPositive/DownloadWindow.cpp    Wed Mar 24 
22:32:04 2010        (r357)
@@ -315,11 +315,13 @@
                return;
        }
        fDownloadViewsLayout->AddView(index, view);
-       float viewHeight = view->MinSize().height + 1;
+
+       // Scroll new download into view
        if (BScrollBar* scrollBar = 
fDownloadsScrollView->ScrollBar(B_VERTICAL)) {
                float min;
                float max;
                scrollBar->GetRange(&min, &max);
+               float viewHeight = view->MinSize().height + 1;
                float scrollOffset = min + index * viewHeight;
                float scrollBarHeight = scrollBar->Bounds().Height() - 1;
                float value = scrollBar->Value();
@@ -330,6 +332,7 @@
                        scrollBar->SetValue(value + diff);
                }
        }
+
        _SaveSettings();
 
        SetWorkspaces(B_CURRENT_WORKSPACE);

Other related posts:

  • » [haiku-webkit-commits] r357 - webkit/trunk/WebKit/haiku/WebPositive - webkit