]> git.saurik.com Git - wxWidgets.git/commitdiff
a workaround for Mac update problems
authorVadim Zeitlin <vadim@wxwidgets.org>
Sun, 1 Jun 2003 15:48:10 +0000 (15:48 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Sun, 1 Jun 2003 15:48:10 +0000 (15:48 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@20820 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/generic/vscroll.cpp

index e7cb8cfa06c9d7d4afc6747edbefbff5bd735dbd..0d71a2fc67a72eb4f7758a15e69ab299644c274d 100644 (file)
@@ -164,8 +164,8 @@ void wxVScrolledWindow::SetLineCount(size_t count)
                                    count/2 + NUM_LINES_TO_SAMPLE/2);
 
         // use the height of the lines we looked as the average
-        m_heightTotal = ((float)m_heightTotal / (3*NUM_LINES_TO_SAMPLE)) *
-                            m_lineMax;
+        m_heightTotal = (wxCoord)
+                (((float)m_heightTotal / (3*NUM_LINES_TO_SAMPLE)) * m_lineMax);
     }
 
 
@@ -354,5 +354,9 @@ void wxVScrolledWindow::OnScroll(wxScrollWinEvent& event)
     }
 
     ScrollToLine(lineFirstNew);
+
+#ifdef __WXMAC__
+    Update();
+#endif // __WXMAC__
 }