Fixed some wxNotebook refresh problems on wxUniv/WIN32

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@17959 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Julian Smart
2002-11-24 11:52:33 +00:00
parent f9829ca9f6
commit 17ffbcef2e

View File

@@ -330,6 +330,7 @@ bool wxNotebook::InsertPage(int nPage,
bSelect = TRUE; bSelect = TRUE;
Relayout(); Relayout();
Refresh();
} }
else // not the first tab else // not the first tab
{ {
@@ -518,10 +519,20 @@ void wxNotebook::DoDraw(wxControlRenderer *renderer)
wxSize sizeSpinBtn = m_spinbtn->GetSize(); wxSize sizeSpinBtn = m_spinbtn->GetSize();
if ( IsVertical() ) if ( IsVertical() )
{
rectTabs.height -= sizeSpinBtn.y; rectTabs.height -= sizeSpinBtn.y;
// Allow for erasing the line under selected tab
rectTabs.width += 2;
}
else else
{
rectTabs.width -= sizeSpinBtn.x; rectTabs.width -= sizeSpinBtn.x;
// Allow for erasing the line under selected tab
rectTabs.height += 2;
}
dc.SetClippingRegion(rectTabs); dc.SetClippingRegion(rectTabs);
} }
@@ -566,6 +577,8 @@ void wxNotebook::DoDraw(wxControlRenderer *renderer)
{ {
DoDrawTab(dc, rectSel, m_sel); DoDrawTab(dc, rectSel, m_sel);
} }
dc.DestroyClippingRegion();
} }
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------