avoid GTK "assertion `min < max' failed"

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@39200 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Paul Cornett
2006-05-18 02:39:23 +00:00
parent 152e88789d
commit de7bb80239
2 changed files with 16 additions and 1 deletions

View File

@@ -182,6 +182,12 @@ void wxScrollBar::SetThumbPosition( int viewStart )
void wxScrollBar::SetScrollbar(int position, int thumbSize, int range, int pageSize, bool)
{
if (range == 0)
{
// GtkRange requires upper > lower
range =
thumbSize = 1;
}
GtkAdjustment* adj = ((GtkRange*)m_widget)->adjustment;
adj->value = position;
adj->step_increment = 1;