reset m_sashPosition to 0 after calling OnUnsplit(), not before
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@1581 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -165,7 +165,7 @@ void wxSplitterWindow::OnMouseEvent(wxMouseEvent& event)
|
|||||||
// We can stop dragging now and see what we've got.
|
// We can stop dragging now and see what we've got.
|
||||||
m_dragMode = wxSPLIT_DRAG_NONE;
|
m_dragMode = wxSPLIT_DRAG_NONE;
|
||||||
ReleaseMouse();
|
ReleaseMouse();
|
||||||
|
|
||||||
// Erase old tracker
|
// Erase old tracker
|
||||||
DrawSashTracker(m_oldX, m_oldY);
|
DrawSashTracker(m_oldX, m_oldY);
|
||||||
|
|
||||||
@@ -255,7 +255,7 @@ void wxSplitterWindow::OnMouseEvent(wxMouseEvent& event)
|
|||||||
|
|
||||||
// Draw new one
|
// Draw new one
|
||||||
DrawSashTracker(x, y);
|
DrawSashTracker(x, y);
|
||||||
|
|
||||||
m_oldX = x;
|
m_oldX = x;
|
||||||
m_oldY = y;
|
m_oldY = y;
|
||||||
}
|
}
|
||||||
@@ -591,8 +591,8 @@ bool wxSplitterWindow::Unsplit(wxWindow *toRemove)
|
|||||||
{
|
{
|
||||||
wxWindow *win = m_windowTwo ;
|
wxWindow *win = m_windowTwo ;
|
||||||
m_windowTwo = (wxWindow *) NULL;
|
m_windowTwo = (wxWindow *) NULL;
|
||||||
m_sashPosition = 0;
|
|
||||||
OnUnsplit(win);
|
OnUnsplit(win);
|
||||||
|
m_sashPosition = 0;
|
||||||
SizeWindows();
|
SizeWindows();
|
||||||
}
|
}
|
||||||
else if ( toRemove == m_windowOne )
|
else if ( toRemove == m_windowOne )
|
||||||
@@ -600,12 +600,16 @@ bool wxSplitterWindow::Unsplit(wxWindow *toRemove)
|
|||||||
wxWindow *win = m_windowOne ;
|
wxWindow *win = m_windowOne ;
|
||||||
m_windowOne = m_windowTwo;
|
m_windowOne = m_windowTwo;
|
||||||
m_windowTwo = (wxWindow *) NULL;
|
m_windowTwo = (wxWindow *) NULL;
|
||||||
m_sashPosition = 0;
|
|
||||||
OnUnsplit(win);
|
OnUnsplit(win);
|
||||||
|
m_sashPosition = 0;
|
||||||
SizeWindows();
|
SizeWindows();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
|
wxFAIL_MSG("splitter: attempt to remove a non-existent window");
|
||||||
|
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user