- wxSashEvent event(GetId(), edge);
- event.SetEventObject(this);
- event.SetDragStatus(status);
- event.SetDragRect(dragRect);
- GetEventHandler()->ProcessEvent(event);
- }
- else if (event.Moving() && !event.Dragging())
- {
+ if ( newWidth == wxDefaultCoord )
+ {
+ // didn't change
+ newWidth = w;
+ }
+ else
+ {
+ // make sure it's in m_minimumPaneSizeY..m_maximumPaneSizeY range
+ newWidth = wxMax(newWidth, m_minimumPaneSizeX);
+ newWidth = wxMin(newWidth, m_maximumPaneSizeX);
+ }
+
+ dragRect = wxRect(x, y, newWidth, newHeight);
+
+ wxSashEvent eventSash(GetId(), edge);
+ eventSash.SetEventObject(this);
+ eventSash.SetDragStatus(status);
+ eventSash.SetDragRect(dragRect);
+ GetEventHandler()->ProcessEvent(eventSash);
+ }
+ else if ( event.LeftUp() )
+ {
+ if (m_mouseCaptured)
+ ReleaseMouse();
+ m_mouseCaptured = false;
+ }
+ else if (event.Moving() && !event.Dragging())
+ {