X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/94b8ecf1cdefea63f07f9ed2b54a2ad2556ec001..55410bb4f67febe1ca20654f078ea4fb9a6223ae:/src/propgrid/propgridpagestate.cpp diff --git a/src/propgrid/propgridpagestate.cpp b/src/propgrid/propgridpagestate.cpp index 59c3a88a39..0e34d126fb 100644 --- a/src/propgrid/propgridpagestate.cpp +++ b/src/propgrid/propgridpagestate.cpp @@ -268,6 +268,15 @@ void wxPropertyGridPageState::InitNonCatMode() void wxPropertyGridPageState::DoClear() { + if ( m_pPropGrid && m_pPropGrid->GetState() == this ) + { + m_pPropGrid->ClearSelection(false); + } + else + { + m_selected = NULL; + } + m_regularArray.Empty(); if ( m_abcArray ) m_abcArray->Empty(); @@ -280,8 +289,6 @@ void wxPropertyGridPageState::DoClear() m_virtualHeight = 0; m_vhCalcPending = 0; - - m_selected = NULL; } // ----------------------------------------------------------------------- @@ -863,7 +870,7 @@ void wxPropertyGridPageState::SetSplitterLeft( bool subProps ) { wxPropertyGrid* pg = GetGrid(); wxClientDC dc(pg); - dc.SetFont(pg->m_font); + dc.SetFont(pg->GetFont()); int maxW = GetColumnFitWidth(dc, m_properties, 0, subProps); @@ -880,7 +887,7 @@ wxSize wxPropertyGridPageState::DoFitColumns( bool WXUNUSED(allowGridResize) ) { wxPropertyGrid* pg = GetGrid(); wxClientDC dc(pg); - dc.SetFont(pg->m_font); + dc.SetFont(pg->GetFont()); int marginWidth = pg->m_marginWidth; int accWid = marginWidth;