X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/0e4cfcdd7729457d2fb5922ace5c091576c2ca6b..addbdd29857a18bfe990b2746c03fe8c9341c57a:/src/generic/splitter.cpp?ds=sidebyside diff --git a/src/generic/splitter.cpp b/src/generic/splitter.cpp index 98b0c13ce3..6c5965e49a 100644 --- a/src/generic/splitter.cpp +++ b/src/generic/splitter.cpp @@ -50,7 +50,6 @@ IMPLEMENT_DYNAMIC_CLASS(wxSplitterEvent, wxNotifyEvent) BEGIN_EVENT_TABLE(wxSplitterWindow, wxWindow) EVT_PAINT(wxSplitterWindow::OnPaint) EVT_SIZE(wxSplitterWindow::OnSize) - EVT_IDLE(wxSplitterWindow::OnIdle) EVT_MOUSE_EVENTS(wxSplitterWindow::OnMouseEvent) #if defined( __WXMSW__ ) || defined( __WXMAC__) @@ -156,12 +155,12 @@ void wxSplitterWindow::OnPaint(wxPaintEvent& WXUNUSED(event)) DrawSash(dc); } -void wxSplitterWindow::OnIdle(wxIdleEvent& event) +void wxSplitterWindow::OnInternalIdle() { + wxWindow::OnInternalIdle(); + if (m_needUpdating) SizeWindows(); - - event.Skip(); } void wxSplitterWindow::OnMouseEvent(wxMouseEvent& event) @@ -281,13 +280,17 @@ void wxSplitterWindow::OnMouseEvent(wxMouseEvent& event) SizeWindows(); } // left up && dragging - else if (event.Moving() && !event.Dragging()) + else if ((event.Moving() || event.Leaving() || event.Entering()) && (m_dragMode == wxSPLIT_DRAG_NONE)) { // Just change the cursor as required - if ( SashHitTest(x, y) ) + if ( !event.Leaving() && SashHitTest(x, y) ) + { SetResizeCursor(); + } else + { SetCursor(* wxSTANDARD_CURSOR); + } } else if (event.Dragging() && (m_dragMode == wxSPLIT_DRAG_DRAGGING)) {