- int minSize = (m_splitMode == wxSPLIT_VERTICAL) ?
- win->GetMinWidth() : win->GetMinHeight();
- if ( minSize != -1 && sashPos > window_size - minSize - GetBorderSize() )
- sashPos = window_size - minSize - GetBorderSize();
+ int minSize = m_splitMode == wxSPLIT_VERTICAL ? win->GetMinWidth()
+ : win->GetMinHeight();
+
+ if ( minSize == -1 || m_minimumPaneSize > minSize )
+ minSize = m_minimumPaneSize;
+
+ int maxSize = window_size - minSize - GetBorderSize();
+ if ( sashPos > maxSize )
+ sashPos = maxSize;
+ }
+
+ return sashPos;
+}
+
+void wxSplitterWindow::DoSetSashPosition(int sashPos)
+{
+ int newSashPosition = AdjustSashPosition(sashPos);
+
+ if ( newSashPosition != m_sashPosition )
+ {
+ m_sashPosition = newSashPosition;
+
+ wxSplitterEvent event(wxEVT_COMMAND_SPLITTER_SASH_POS_CHANGED, this);
+ event.m_data.pos = m_sashPosition;
+
+ (void)DoSendEvent(event);