X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/e0c6027b5a0af9050eca56774967437a66241026..4760fa91097407e9967efd21f90ef04d69e5bb9c:/src/generic/vscroll.cpp diff --git a/src/generic/vscroll.cpp b/src/generic/vscroll.cpp index e7cb8cfa06..5d2ccf0cb6 100644 --- a/src/generic/vscroll.cpp +++ b/src/generic/vscroll.cpp @@ -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); } @@ -196,6 +196,13 @@ void wxVScrolledWindow::RefreshLine(size_t line) RefreshRect(rect); } +void wxVScrolledWindow::RefreshAll() +{ + UpdateScrollbar(); + + Refresh(); +} + int wxVScrolledWindow::HitTest(wxCoord WXUNUSED(x), wxCoord y) const { const size_t lineMax = GetLastVisibleLine(); @@ -354,5 +361,9 @@ void wxVScrolledWindow::OnScroll(wxScrollWinEvent& event) } ScrollToLine(lineFirstNew); + +#ifdef __WXMAC__ + Update(); +#endif // __WXMAC__ }