Fix bugs related to two phase creation of wxRibbon classes.

Add missing wxRibbonControl::Create() method. Ensure that member variables are
always initialized by the ctor. Check that we're fully initialized in EVT_SIZE
handler.

Closes #12018.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64243 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2010-05-07 23:38:21 +00:00
parent 740ebe19a4
commit fd6e15974c
5 changed files with 29 additions and 9 deletions

View File

@@ -415,9 +415,12 @@ void wxRibbonPage::OnSize(wxSizeEvent& evt)
{
wxSize new_size = evt.GetSize();
wxMemoryDC temp_dc;
wxRect invalid_rect = m_art->GetPageBackgroundRedrawArea(temp_dc, this, m_old_size, new_size);
Refresh(true, &invalid_rect);
if (m_art)
{
wxMemoryDC temp_dc;
wxRect invalid_rect = m_art->GetPageBackgroundRedrawArea(temp_dc, this, m_old_size, new_size);
Refresh(true, &invalid_rect);
}
m_old_size = new_size;