wxGTK2 sends *only* wxEVT_SCROLLWIN_THUMBTRACK (why?) so
wxVScrolledWindow needs to respond to it otherwise nothing happens when using the scrollbar. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@26100 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -374,6 +374,7 @@ void wxVScrolledWindow::OnScroll(wxScrollWinEvent& event)
|
|||||||
size_t lineFirstNew;
|
size_t lineFirstNew;
|
||||||
|
|
||||||
const wxEventType evtType = event.GetEventType();
|
const wxEventType evtType = event.GetEventType();
|
||||||
|
|
||||||
if ( evtType == wxEVT_SCROLLWIN_TOP )
|
if ( evtType == wxEVT_SCROLLWIN_TOP )
|
||||||
{
|
{
|
||||||
lineFirstNew = 0;
|
lineFirstNew = 0;
|
||||||
@@ -398,21 +399,19 @@ void wxVScrolledWindow::OnScroll(wxScrollWinEvent& event)
|
|||||||
{
|
{
|
||||||
lineFirstNew = GetLastVisibleLine();
|
lineFirstNew = GetLastVisibleLine();
|
||||||
}
|
}
|
||||||
|
else if ( evtType == wxEVT_SCROLLWIN_THUMBRELEASE )
|
||||||
|
{
|
||||||
|
lineFirstNew = event.GetPosition();
|
||||||
|
}
|
||||||
|
else if ( evtType == wxEVT_SCROLLWIN_THUMBTRACK )
|
||||||
|
{
|
||||||
|
lineFirstNew = event.GetPosition();
|
||||||
|
}
|
||||||
|
|
||||||
else // unknown scroll event?
|
else // unknown scroll event?
|
||||||
{
|
{
|
||||||
if ( evtType == wxEVT_SCROLLWIN_THUMBRELEASE )
|
wxFAIL_MSG( _T("unknown scroll event type?") );
|
||||||
{
|
return;
|
||||||
lineFirstNew = event.GetPosition();
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
wxASSERT_MSG( evtType == wxEVT_SCROLLWIN_THUMBTRACK,
|
|
||||||
_T("unknown scroll event type?") );
|
|
||||||
|
|
||||||
// don't do anything, otherwise dragging the thumb around would
|
|
||||||
// be too slow
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ScrollToLine(lineFirstNew);
|
ScrollToLine(lineFirstNew);
|
||||||
|
Reference in New Issue
Block a user