Don't set the size until after everything is initialized
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@29011 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
f72c753686
commit
5a9b107dd0
@ -3849,15 +3849,8 @@ wxGrid::wxGrid( wxWindow *parent,
|
|||||||
m_colMinWidths(GRID_HASH_SIZE),
|
m_colMinWidths(GRID_HASH_SIZE),
|
||||||
m_rowMinHeights(GRID_HASH_SIZE)
|
m_rowMinHeights(GRID_HASH_SIZE)
|
||||||
{
|
{
|
||||||
// in order to make sure that a size event is not
|
|
||||||
// trigerred in a unfinished state
|
|
||||||
m_cornerLabelWin = NULL ;
|
|
||||||
m_rowLabelWin = NULL ;
|
|
||||||
m_colLabelWin = NULL ;
|
|
||||||
m_gridWin = NULL ;
|
|
||||||
|
|
||||||
SetBestFittingSize(size);
|
|
||||||
Create();
|
Create();
|
||||||
|
SetBestFittingSize(size);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool wxGrid::Create(wxWindow *parent, wxWindowID id,
|
bool wxGrid::Create(wxWindow *parent, wxWindowID id,
|
||||||
@ -3871,8 +3864,8 @@ bool wxGrid::Create(wxWindow *parent, wxWindowID id,
|
|||||||
m_colMinWidths = wxLongToLongHashMap(GRID_HASH_SIZE) ;
|
m_colMinWidths = wxLongToLongHashMap(GRID_HASH_SIZE) ;
|
||||||
m_rowMinHeights = wxLongToLongHashMap(GRID_HASH_SIZE) ;
|
m_rowMinHeights = wxLongToLongHashMap(GRID_HASH_SIZE) ;
|
||||||
|
|
||||||
SetBestFittingSize(size);
|
|
||||||
Create() ;
|
Create() ;
|
||||||
|
SetBestFittingSize(size);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user