Refresh wxPropertGrid after resetting column sizes

Grid needs to be redrawn with new splitters positions.

Closes #18312.
This commit is contained in:
Artur Wieczorek
2018-12-26 09:09:44 +01:00
parent 2937369869
commit 1042521706

View File

@@ -2823,12 +2823,16 @@ void wxPropertyGrid::DoSetSplitterPosition( int newxpos,
void wxPropertyGrid::ResetColumnSizes( bool enableAutoResizing ) void wxPropertyGrid::ResetColumnSizes( bool enableAutoResizing )
{ {
wxPropertyGridPageState* state = m_pState; if ( m_pState )
if ( state ) {
state->ResetColumnSizes(0); m_pState->ResetColumnSizes(0);
if ( GetSelection() )
CorrectEditorWidgetSizeX();
Refresh();
if ( enableAutoResizing && HasFlag(wxPG_SPLITTER_AUTO_CENTER) ) if ( enableAutoResizing && HasFlag(wxPG_SPLITTER_AUTO_CENTER) )
m_pState->m_dontCenterSplitter = false; m_pState->m_dontCenterSplitter = false;
}
} }
// ----------------------------------------------------------------------- // -----------------------------------------------------------------------