From 8d0f89813db906152e3654b4bf61381b12ffd255 Mon Sep 17 00:00:00 2001 From: Charlie Fenton Date: Fri, 26 Oct 2012 01:36:19 -0700 Subject: [PATCH] Fix a bad wxFlexGridSizer in Options dialog which caused assert. Note: wxWidgets 2.9.4 now throws an assert if you add more rows to a wxFlexGridSizer than you specified in its constructor. --- checkin_notes | 6 +++++- clientgui/DlgOptions.cpp | 4 ++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/checkin_notes b/checkin_notes index 95cbe8a282..486f6d5782 100644 --- a/checkin_notes +++ b/checkin_notes @@ -6221,7 +6221,7 @@ Charlie 25 Oct 2012 - Mac: Fix icons in Simple View Task and Project selection combo boxes. - Mac: Eliminate some unnecessary code. - Mac: Fix Quit command in Simple View and a crash bug with Quit AppleEvent. - - Fix a bad FlexGridSizer in Simple Preferences dialog which caused assert. + - Fix a bad wxFlexGridSizer in Simple Preferences dialog which caused assert. - Fix assert in Simple Preferences: use window foreground color for CTransparentStaticLine if skin does not specify tag. - Fix assert in SkinManager when file referenced by tag @@ -6238,6 +6238,10 @@ Charlie 25 Oct 2012 Charlie 25 Oct 2012 - Mac: Work around wxMemoryDC::Clear() bug in drawing Simple View background. + - Fix a bad wxFlexGridSizer in Options dialog which caused assert. + Note: wxWidgets 2.9.4 now throws an assert if you add more rows to a + wxFlexGridSizer than you specified in its constructor. clientgui/ + DlgOptions.cpp sg_BoincSimpleFrame.cpp diff --git a/clientgui/DlgOptions.cpp b/clientgui/DlgOptions.cpp index 01ccff7546..60b8a3edb7 100644 --- a/clientgui/DlgOptions.cpp +++ b/clientgui/DlgOptions.cpp @@ -260,7 +260,7 @@ void CDlgOptions::CreateControls() { itemBoxSizer28->Add(itemStaticBoxSizer30, 0, wxGROW|wxALL, 5); wxGridSizer* itemGridSizer31 = new wxGridSizer(2, 1, 0, 0); itemStaticBoxSizer30->Add(itemGridSizer31, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5); - wxFlexGridSizer* itemFlexGridSizer32 = new wxFlexGridSizer(2, 2, 0, 0); + wxFlexGridSizer* itemFlexGridSizer32 = new wxFlexGridSizer(3, 2, 0, 0); itemGridSizer31->Add(itemFlexGridSizer32, 0, wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL|wxALL, 5); wxStaticText* itemStaticText33 = new wxStaticText; itemStaticText33->Create( itemPanel27, wxID_STATIC, _("Address:"), wxDefaultPosition, wxDefaultSize, 0 ); @@ -324,7 +324,7 @@ void CDlgOptions::CreateControls() { itemBoxSizer44->Add(itemStaticBoxSizer46, 0, wxGROW|wxALL, 5); wxGridSizer* itemGridSizer47 = new wxGridSizer(2, 1, 0, 0); itemStaticBoxSizer46->Add(itemGridSizer47, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5); - wxFlexGridSizer* itemFlexGridSizer48 = new wxFlexGridSizer(2, 2, 0, 0); + wxFlexGridSizer* itemFlexGridSizer48 = new wxFlexGridSizer(3, 2, 0, 0); itemGridSizer47->Add(itemFlexGridSizer48, 0, wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL|wxALL, 5); wxStaticText* itemStaticText49 = new wxStaticText; itemStaticText49->Create( itemPanel43, wxID_STATIC, _("Address:"), wxDefaultPosition, wxDefaultSize, 0 );