crash under FreeBSD corrected (patch by David Hobley)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@813 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -238,6 +238,7 @@ int wxScrolledWindow::CalcScrollInc(wxScrollEvent& event)
|
||||
}
|
||||
if (orient == wxHORIZONTAL)
|
||||
{
|
||||
if (m_xScrollPixelsPerLine > 0) {
|
||||
int w, h;
|
||||
GetClientSize(&w, &h);
|
||||
|
||||
@@ -250,11 +251,13 @@ int wxScrolledWindow::CalcScrollInc(wxScrollEvent& event)
|
||||
nScrollInc = -m_xScrollPosition; // As -ve as we can go
|
||||
else if ( (m_xScrollPosition + nScrollInc) > noPositions )
|
||||
nScrollInc = noPositions - m_xScrollPosition; // As +ve as we can go
|
||||
|
||||
return nScrollInc;
|
||||
}
|
||||
else
|
||||
Refresh();
|
||||
}
|
||||
else
|
||||
{
|
||||
if (m_yScrollPixelsPerLine > 0) {
|
||||
int w, h;
|
||||
GetClientSize(&w, &h);
|
||||
|
||||
@@ -267,10 +270,13 @@ int wxScrolledWindow::CalcScrollInc(wxScrollEvent& event)
|
||||
nScrollInc = -m_yScrollPosition; // As -ve as we can go
|
||||
else if ( (m_yScrollPosition + nScrollInc) > noPositions )
|
||||
nScrollInc = noPositions - m_yScrollPosition; // As +ve as we can go
|
||||
}
|
||||
else
|
||||
Refresh();
|
||||
}
|
||||
|
||||
return nScrollInc;
|
||||
}
|
||||
}
|
||||
|
||||
// Adjust the scrollbars - new version.
|
||||
void wxScrolledWindow::AdjustScrollbars(void)
|
||||
|
Reference in New Issue
Block a user