Miserable hack around problem when shrinking
a scrolled window with child windows when it was maxiamally scrolled. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@16370 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -382,11 +382,14 @@ void wxScrolledWindow::AdjustScrollbars()
|
||||
// right to keep it from over extending.
|
||||
|
||||
if( m_hAdjust->value + m_hAdjust->page_size > m_hAdjust->upper )
|
||||
{
|
||||
if (GetChildren().GetCount() == 0)
|
||||
{
|
||||
m_hAdjust->value = m_hAdjust->upper - m_hAdjust->page_size;
|
||||
m_xScrollPosition = (int)m_hAdjust->value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (m_yScrollPixelsPerLine == 0)
|
||||
{
|
||||
@@ -399,11 +402,14 @@ void wxScrolledWindow::AdjustScrollbars()
|
||||
m_vAdjust->page_size = (h / m_yScrollPixelsPerLine);
|
||||
|
||||
if( m_vAdjust->value + m_vAdjust->page_size > m_vAdjust->upper )
|
||||
{
|
||||
if (GetChildren().GetCount() == 0)
|
||||
{
|
||||
m_vAdjust->value = m_vAdjust->upper - m_vAdjust->page_size;
|
||||
m_yScrollPosition = (int)m_vAdjust->value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
m_xScrollLinesPerPage = (int)(m_hAdjust->page_size + 0.5);
|
||||
m_yScrollLinesPerPage = (int)(m_vAdjust->page_size + 0.5);
|
||||
|
@@ -382,11 +382,14 @@ void wxScrolledWindow::AdjustScrollbars()
|
||||
// right to keep it from over extending.
|
||||
|
||||
if( m_hAdjust->value + m_hAdjust->page_size > m_hAdjust->upper )
|
||||
{
|
||||
if (GetChildren().GetCount() == 0)
|
||||
{
|
||||
m_hAdjust->value = m_hAdjust->upper - m_hAdjust->page_size;
|
||||
m_xScrollPosition = (int)m_hAdjust->value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (m_yScrollPixelsPerLine == 0)
|
||||
{
|
||||
@@ -399,11 +402,14 @@ void wxScrolledWindow::AdjustScrollbars()
|
||||
m_vAdjust->page_size = (h / m_yScrollPixelsPerLine);
|
||||
|
||||
if( m_vAdjust->value + m_vAdjust->page_size > m_vAdjust->upper )
|
||||
{
|
||||
if (GetChildren().GetCount() == 0)
|
||||
{
|
||||
m_vAdjust->value = m_vAdjust->upper - m_vAdjust->page_size;
|
||||
m_yScrollPosition = (int)m_vAdjust->value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
m_xScrollLinesPerPage = (int)(m_hAdjust->page_size + 0.5);
|
||||
m_yScrollLinesPerPage = (int)(m_vAdjust->page_size + 0.5);
|
||||
|
Reference in New Issue
Block a user