Don't redraw wxSplitterWindow sash needlessly
Don't draw the sash in SizeWindows() unless its position was changed by the function.
This commit is contained in:
@@ -662,6 +662,8 @@ void wxSplitterWindow::SetSashPositionAndNotify(int sashPos)
|
|||||||
// including the edges next to the sash.
|
// including the edges next to the sash.
|
||||||
void wxSplitterWindow::SizeWindows()
|
void wxSplitterWindow::SizeWindows()
|
||||||
{
|
{
|
||||||
|
int oldSashPosition = m_sashPosition;
|
||||||
|
|
||||||
// check if we have delayed setting the real sash position
|
// check if we have delayed setting the real sash position
|
||||||
if ( m_requestedSashPosition != INT_MAX )
|
if ( m_requestedSashPosition != INT_MAX )
|
||||||
{
|
{
|
||||||
@@ -727,8 +729,11 @@ void wxSplitterWindow::SizeWindows()
|
|||||||
GetWindow1()->SetSize(border, border, w1, h1);
|
GetWindow1()->SetSize(border, border, w1, h1);
|
||||||
}
|
}
|
||||||
|
|
||||||
wxClientDC dc(this);
|
if ( oldSashPosition != m_sashPosition )
|
||||||
DrawSash(dc);
|
{
|
||||||
|
wxClientDC dc(this);
|
||||||
|
DrawSash(dc);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Set pane for unsplit window
|
// Set pane for unsplit window
|
||||||
|
Reference in New Issue
Block a user