Since the changes if r68876, the splitter windows were not resized correctly
if the splitter size in the direction orthogonal to its own didn't change.
This was an unintended side effect of the changes in that commit as it only
wanted to avoid calling SetSashPositionAndNotify() in this case, but
SizeWindows() should still be called.
Ensure that we do call it always from wxSplitterWindow::OnSize() to fix this.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69059
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
// out of current range in this case as otherwise the really requested
// position would be lost and never set. Wait until we get a real size
// event with our non-initial size to do it.
// out of current range in this case as otherwise the really requested
// position would be lost and never set. Wait until we get a real size
// event with our non-initial size to do it.
- if ( size == old_size )
- return;
-
- int delta = (int) ( (size - old_size)*m_sashGravity );
- if ( delta != 0 )
+ if ( size != old_size )
- int newPosition = m_sashPosition + delta;
- if( newPosition < m_minimumPaneSize )
- newPosition = m_minimumPaneSize;
- SetSashPositionAndNotify(newPosition);
- }
+ int delta = (int) ( (size - old_size)*m_sashGravity );
+ if ( delta != 0 )
+ {
+ int newPosition = m_sashPosition + delta;
+ if( newPosition < m_minimumPaneSize )
+ newPosition = m_minimumPaneSize;
+ SetSashPositionAndNotify(newPosition);
+ }
- if ( m_sashPosition >= size - 5 )
- SetSashPositionAndNotify(wxMax(10, size - 40));
- m_lastSize = wxSize(w,h);
+ if ( m_sashPosition >= size - 5 )
+ SetSashPositionAndNotify(wxMax(10, size - 40));
+ m_lastSize = wxSize(w,h);
+ }