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 (orient == wxHORIZONTAL)
|
||||||
{
|
{
|
||||||
|
if (m_xScrollPixelsPerLine > 0) {
|
||||||
int w, h;
|
int w, h;
|
||||||
GetClientSize(&w, &h);
|
GetClientSize(&w, &h);
|
||||||
|
|
||||||
@@ -250,11 +251,13 @@ int wxScrolledWindow::CalcScrollInc(wxScrollEvent& event)
|
|||||||
nScrollInc = -m_xScrollPosition; // As -ve as we can go
|
nScrollInc = -m_xScrollPosition; // As -ve as we can go
|
||||||
else if ( (m_xScrollPosition + nScrollInc) > noPositions )
|
else if ( (m_xScrollPosition + nScrollInc) > noPositions )
|
||||||
nScrollInc = noPositions - m_xScrollPosition; // As +ve as we can go
|
nScrollInc = noPositions - m_xScrollPosition; // As +ve as we can go
|
||||||
|
}
|
||||||
return nScrollInc;
|
else
|
||||||
|
Refresh();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
if (m_yScrollPixelsPerLine > 0) {
|
||||||
int w, h;
|
int w, h;
|
||||||
GetClientSize(&w, &h);
|
GetClientSize(&w, &h);
|
||||||
|
|
||||||
@@ -267,9 +270,12 @@ int wxScrolledWindow::CalcScrollInc(wxScrollEvent& event)
|
|||||||
nScrollInc = -m_yScrollPosition; // As -ve as we can go
|
nScrollInc = -m_yScrollPosition; // As -ve as we can go
|
||||||
else if ( (m_yScrollPosition + nScrollInc) > noPositions )
|
else if ( (m_yScrollPosition + nScrollInc) > noPositions )
|
||||||
nScrollInc = noPositions - m_yScrollPosition; // As +ve as we can go
|
nScrollInc = noPositions - m_yScrollPosition; // As +ve as we can go
|
||||||
|
}
|
||||||
|
else
|
||||||
|
Refresh();
|
||||||
|
}
|
||||||
|
|
||||||
return nScrollInc;
|
return nScrollInc;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Adjust the scrollbars - new version.
|
// Adjust the scrollbars - new version.
|
||||||
|
Reference in New Issue
Block a user