X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/1d5fda5dc6f875a20210cd6d7f6b5b794519bd52..9a0a58f5afb88fc72f04333e32208e3b3bf2ccc5:/src/generic/grid.cpp?ds=sidebyside diff --git a/src/generic/grid.cpp b/src/generic/grid.cpp index 945a7914bc..47fc186875 100644 --- a/src/generic/grid.cpp +++ b/src/generic/grid.cpp @@ -4221,6 +4221,7 @@ bool wxGrid::Create(wxWindow *parent, wxWindowID id, Create(); SetInitialSize(size); + CalcDimensions(); return true; } @@ -6953,8 +6954,11 @@ void wxGrid::Refresh(bool eraseb, const wxRect* rect) void wxGrid::OnSize(wxSizeEvent& WXUNUSED(event)) { - // update our children window positions and scrollbars - CalcDimensions(); + if (m_targetWindow != this) // check whether initialisation has been done + { + // update our children window positions and scrollbars + CalcDimensions(); + } } void wxGrid::OnKeyDown( wxKeyEvent& event )