Added wxPropertyGridManager header support; Refactored wxPropertyGrid DoSetSplitterPosition() code

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62867 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Jaakko Salli
2009-12-13 12:00:04 +00:00
parent 9804064630
commit f525476870
10 changed files with 491 additions and 74 deletions

View File

@@ -842,8 +842,7 @@ void wxPropertyGridPageState::PropagateColSizeDec( int column,
void wxPropertyGridPageState::DoSetSplitterPosition( int newXPos,
int splitterColumn,
bool WXUNUSED(allPages),
bool fromAutoCenter )
int flags )
{
wxPropertyGrid* pg = GetGrid();
@@ -878,7 +877,8 @@ void wxPropertyGridPageState::DoSetSplitterPosition( int newXPos,
if ( splitterColumn == 0 )
m_fSplitterX = (double) newXPos;
if ( !fromAutoCenter )
if ( !(flags & wxPG_SPLITTER_FROM_AUTO_CENTER) &&
!(flags & wxPG_SPLITTER_FROM_EVENT) )
{
// Don't allow initial splitter auto-positioning after this.
m_isSplitterPreSet = true;
@@ -1083,7 +1083,8 @@ void wxPropertyGridPageState::CheckColumnWidths( int widthChange )
}
}
DoSetSplitterPosition((int)splitterX, 0, false, true);
DoSetSplitterPosition((int)splitterX, 0,
wxPG_SPLITTER_FROM_AUTO_CENTER);
m_fSplitterX = splitterX; // needed to retain accuracy
}