Sometimes, deleting code can be a real gain. This
fixes display corruption when a scroll window is made smaller and it was previously scrolled to the bottom or right most position. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@15608 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -379,7 +379,6 @@ void wxScrolledWindow::AdjustScrollbars()
|
|||||||
if( m_hAdjust->value + m_hAdjust->page_size > m_hAdjust->upper )
|
if( m_hAdjust->value + m_hAdjust->page_size > m_hAdjust->upper )
|
||||||
{
|
{
|
||||||
m_hAdjust->value = m_hAdjust->upper - m_hAdjust->page_size;
|
m_hAdjust->value = m_hAdjust->upper - m_hAdjust->page_size;
|
||||||
m_targetWindow->ScrollWindow( (int) (m_xScrollPosition - m_hAdjust->value) * m_xScrollPixelsPerLine, 0 );
|
|
||||||
m_xScrollPosition = (int)m_hAdjust->value;
|
m_xScrollPosition = (int)m_hAdjust->value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -397,7 +396,6 @@ void wxScrolledWindow::AdjustScrollbars()
|
|||||||
if( m_vAdjust->value + m_vAdjust->page_size > m_vAdjust->upper )
|
if( m_vAdjust->value + m_vAdjust->page_size > m_vAdjust->upper )
|
||||||
{
|
{
|
||||||
m_vAdjust->value = m_vAdjust->upper - m_vAdjust->page_size;
|
m_vAdjust->value = m_vAdjust->upper - m_vAdjust->page_size;
|
||||||
m_targetWindow->ScrollWindow( 0, (int) (m_yScrollPosition - m_vAdjust->value) * m_yScrollPixelsPerLine );
|
|
||||||
m_yScrollPosition = (int)m_vAdjust->value;
|
m_yScrollPosition = (int)m_vAdjust->value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -379,7 +379,6 @@ void wxScrolledWindow::AdjustScrollbars()
|
|||||||
if( m_hAdjust->value + m_hAdjust->page_size > m_hAdjust->upper )
|
if( m_hAdjust->value + m_hAdjust->page_size > m_hAdjust->upper )
|
||||||
{
|
{
|
||||||
m_hAdjust->value = m_hAdjust->upper - m_hAdjust->page_size;
|
m_hAdjust->value = m_hAdjust->upper - m_hAdjust->page_size;
|
||||||
m_targetWindow->ScrollWindow( (int) (m_xScrollPosition - m_hAdjust->value) * m_xScrollPixelsPerLine, 0 );
|
|
||||||
m_xScrollPosition = (int)m_hAdjust->value;
|
m_xScrollPosition = (int)m_hAdjust->value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -397,7 +396,6 @@ void wxScrolledWindow::AdjustScrollbars()
|
|||||||
if( m_vAdjust->value + m_vAdjust->page_size > m_vAdjust->upper )
|
if( m_vAdjust->value + m_vAdjust->page_size > m_vAdjust->upper )
|
||||||
{
|
{
|
||||||
m_vAdjust->value = m_vAdjust->upper - m_vAdjust->page_size;
|
m_vAdjust->value = m_vAdjust->upper - m_vAdjust->page_size;
|
||||||
m_targetWindow->ScrollWindow( 0, (int) (m_yScrollPosition - m_vAdjust->value) * m_yScrollPixelsPerLine );
|
|
||||||
m_yScrollPosition = (int)m_vAdjust->value;
|
m_yScrollPosition = (int)m_vAdjust->value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user