+ if ( m_isDragging )
+ {
+ scrollEvent = wxEVT_SCROLL_THUMBRELEASE;
+ m_isDragging = false;
+ }
+ else
+ {
+ // this seems to only happen when the mouse wheel is used: in
+ // this case, as it might be unexpected to get THUMBRELEASE
+ // without preceding THUMBTRACKs, we don't generate it at all
+ // but generate CHANGED event because the control itself does
+ // not send us SB_ENDSCROLL for whatever reason when mouse
+ // wheel is used
+ scrollEvent = wxEVT_SCROLL_CHANGED;
+ }