X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/ca1ecff429d8e26aa604c802b1fce0fda6e8c188..c77a67962c2f50a872491869fcf1a6c082fdc6c6:/src/univ/scrolbar.cpp diff --git a/src/univ/scrolbar.cpp b/src/univ/scrolbar.cpp index 752ad21584..d103fb90e7 100644 --- a/src/univ/scrolbar.cpp +++ b/src/univ/scrolbar.cpp @@ -17,10 +17,6 @@ // headers // ---------------------------------------------------------------------------- -#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) - #pragma implementation "univscrolbar.h" -#endif - #include "wx/wxprec.h" #ifdef __BORLANDC__ @@ -256,7 +252,7 @@ void wxScrollBar::SetScrollbar(int position, int thumbSize, int range, int pageSize, bool refresh) { - // we only refresh everythign when the range changes, thumb position + // we only refresh everything when the range changes, thumb position // changes are handled in OnIdle bool needsRefresh = (range != m_range) || (thumbSize != m_thumbSize) || @@ -554,12 +550,18 @@ bool wxScrollBar::PerformAction(const wxControlAction& action, // NB: we assume that scrollbar events are sequentially numbered // but this should be ok as other code relies on this as well scrollType += wxEVT_SCROLL_TOP - wxEVT_SCROLLWIN_TOP; + wxScrollEvent event(scrollType, this->GetId(), m_thumbPos, + IsVertical() ? wxVERTICAL : wxHORIZONTAL); + event.SetEventObject(this); + GetParent()->GetEventHandler()->ProcessEvent(event); + } + else // part of the window + { + wxScrollWinEvent event(scrollType, m_thumbPos, + IsVertical() ? wxVERTICAL : wxHORIZONTAL); + event.SetEventObject(this); + GetParent()->GetEventHandler()->ProcessEvent(event); } - - wxScrollWinEvent event(scrollType, m_thumbPos, - IsVertical() ? wxVERTICAL : wxHORIZONTAL); - event.SetEventObject(this); - GetParent()->GetEventHandler()->ProcessEvent(event); } return true;