]> git.saurik.com Git - wxWidgets.git/blobdiff - src/generic/vscroll.cpp
Applied patch #840643 from Ian Brown with some modifications:
[wxWidgets.git] / src / generic / vscroll.cpp
index 49545e7abacec822ff4d1171f80b58208dc5553c..e592f8054169030b2e9e3e99e83a40a03f43880d 100644 (file)
@@ -17,7 +17,7 @@
 // headers
 // ----------------------------------------------------------------------------
 
-#ifdef __GNUG__
+#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
 #pragma implementation "vscroll.h"
 #endif
 
@@ -44,6 +44,8 @@ END_EVENT_TABLE()
 // implementation
 // ============================================================================
 
+IMPLEMENT_ABSTRACT_CLASS(wxVScrolledWindow, wxPanel)
+
 // ----------------------------------------------------------------------------
 // initialization
 // ----------------------------------------------------------------------------
@@ -90,7 +92,7 @@ wxCoord wxVScrolledWindow::EstimateTotalHeight() const
 
         // use the height of the lines we looked as the average
         heightTotal = (wxCoord)
-                (((float)m_heightTotal / (3*NUM_LINES_TO_SAMPLE)) * m_lineMax);
+                (((float)heightTotal / (3*NUM_LINES_TO_SAMPLE)) * m_lineMax);
     }
 
     return heightTotal;