X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/4ba64bdeb2aeadee4b0abcfddf2e227088a37b16..3543c79e6fe198f70130e13c9a2ea68754ba6274:/samples/scroll/scroll.cpp diff --git a/samples/scroll/scroll.cpp b/samples/scroll/scroll.cpp index 4a9e3aac09..1bec08436a 100644 --- a/samples/scroll/scroll.cpp +++ b/samples/scroll/scroll.cpp @@ -830,7 +830,6 @@ void MyAutoTimedScrollingWindow::OnDraw(wxDC& dc) // draw the characters // 1. for each update region for (wxRegionIterator upd(GetUpdateRegion()); upd; ++upd) { - wxSize clientSize = GetClientSize(); wxRect updRect = upd.GetRect(); wxRect updRectInGChars(DeviceCoordsToGraphicalChars(updRect)); // 2. for each row of chars in the update region @@ -905,15 +904,15 @@ void MyAutoTimedScrollingWindow::OnScroll(wxScrollWinEvent& event) // FIXME: the cursor also moves when the scrollbar arrows are clicked if (HasCapture()) { if (event.GetOrientation() == wxHORIZONTAL) { - if (event.m_eventType == wxEVT_SCROLLWIN_LINEUP) { + if (event.GetEventType() == wxEVT_SCROLLWIN_LINEUP) { --m_cursor.x; - } else if (event.m_eventType == wxEVT_SCROLLWIN_LINEDOWN) { + } else if (event.GetEventType() == wxEVT_SCROLLWIN_LINEDOWN) { ++m_cursor.x; } } else if (event.GetOrientation() == wxVERTICAL) { - if (event.m_eventType == wxEVT_SCROLLWIN_LINEUP) { + if (event.GetEventType() == wxEVT_SCROLLWIN_LINEUP) { --m_cursor.y; - } else if (event.m_eventType == wxEVT_SCROLLWIN_LINEDOWN) { + } else if (event.GetEventType() == wxEVT_SCROLLWIN_LINEDOWN) { ++m_cursor.y; } }