check whether the grid is fully created in Refresh() (fixes a crash under Mac); refactored members initialization into a new InitVars() method to avoid duplication and ensure that they're always initialized (slightly modified patch 1901366)

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@52122 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2008-02-26 17:17:28 +00:00
parent 8d788b830c
commit f954984155
2 changed files with 25 additions and 16 deletions

View File

@@ -1090,9 +1090,9 @@ WX_DECLARE_OBJARRAY_WITH_DECL(wxGridCellCoords, wxGridCellCoordsArray,
class WXDLLIMPEXP_ADV wxGrid : public wxScrolledWindow
{
public:
wxGrid() ;
wxGrid();
wxGrid( wxWindow *parent,
wxGrid( wxWindow *parent,
wxWindowID id,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
@@ -1645,6 +1645,7 @@ public:
: wxScrolledWindow( parent, wxID_ANY, wxPoint(x,y), wxSize(w,h),
(style|wxWANTS_CHARS), name )
{
InitVars();
Create();
}
@@ -1989,6 +1990,7 @@ protected:
void Create();
void Init();
void InitVars();
void CalcDimensions();
void CalcWindowSizes();
bool Redimension( wxGridTableMessage& );