Use getter functions to get access to some properties of wxPropertyGridPageState, cont.
Use existing DoGetRoot(), GetRoot(), GetVirtualWidth() functions instead of getting direct access to the corresponding member variables.
This commit is contained in:
@@ -1126,7 +1126,7 @@ wxPGProperty* wxPropertyGridManager::GetPageRoot( int index ) const
|
||||
NULL,
|
||||
wxT("invalid page index") );
|
||||
|
||||
return m_arrPages[index]->GetStatePtr()->m_properties;
|
||||
return m_arrPages[index]->GetRoot();
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------
|
||||
@@ -1868,7 +1868,7 @@ void wxPropertyGridManager::SetSplitterLeft( bool subProps, bool allPages )
|
||||
|
||||
for ( i=0; i<GetPageCount(); i++ )
|
||||
{
|
||||
int maxW = m_pState->GetColumnFitWidth(dc, m_arrPages[i]->m_properties, 0, subProps );
|
||||
int maxW = m_pState->GetColumnFitWidth(dc, m_arrPages[i]->DoGetRoot(), 0, subProps );
|
||||
maxW += m_pPropGrid->GetMarginWidth();
|
||||
if ( maxW > highest )
|
||||
highest = maxW;
|
||||
@@ -1895,7 +1895,7 @@ void wxPropertyGridManager::SetPageSplitterLeft(int page, bool subProps)
|
||||
wxClientDC dc(this);
|
||||
dc.SetFont(m_pPropGrid->GetFont());
|
||||
|
||||
int maxW = m_pState->GetColumnFitWidth(dc, m_arrPages[page]->m_properties, 0, subProps );
|
||||
int maxW = m_pState->GetColumnFitWidth(dc, m_arrPages[page]->DoGetRoot(), 0, subProps );
|
||||
maxW += m_pPropGrid->GetMarginWidth();
|
||||
SetPageSplitterPosition( page, maxW );
|
||||
|
||||
@@ -1978,7 +1978,7 @@ void wxPropertyGridManager::OnResize( wxSizeEvent& WXUNUSED(event) )
|
||||
if ( page != m_pPropGrid->GetState() )
|
||||
{
|
||||
page->OnClientWidthChange(pgWidth,
|
||||
pgWidth - page->m_width,
|
||||
pgWidth - page->GetVirtualWidth(),
|
||||
true);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user