From a210cb0bbf783c26ca26277f54736c6188c75999 Mon Sep 17 00:00:00 2001 From: Artur Wieczorek Date: Fri, 29 May 2015 20:56:42 +0200 Subject: [PATCH] Don't use wxALIGN_CENTRE_VERTICAL flags when adding item to the vertical sizer in wxPG. This flag shouldn't be used in vertical sizers (in wxLongStringProperty and wxPGArrayEditorDialog) because vertical alignment flags are ignored in such sizers and the assertion message is thrown in wxBoxSizer::DoInsert. This can be observed e.g. in propgrid sample when there is launched wxLongStringProperty or ArrayDoubleProperty editor. --- src/propgrid/props.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/propgrid/props.cpp b/src/propgrid/props.cpp index 521070ae26..4c734ffd44 100644 --- a/src/propgrid/props.cpp +++ b/src/propgrid/props.cpp @@ -2256,7 +2256,7 @@ bool wxLongStringProperty::DisplayEditorDialog( wxPGProperty* prop, wxPropertyGr buttonSizer->AddButton(new wxButton(dlg, wxID_CANCEL)); buttonSizer->Realize(); topsizer->Add( buttonSizer, 0, - wxALIGN_RIGHT|wxALIGN_CENTRE_VERTICAL|wxBOTTOM|wxRIGHT, + wxALIGN_RIGHT|wxBOTTOM|wxRIGHT, spacing ); dlg->SetSizer( topsizer ); @@ -2396,7 +2396,7 @@ bool wxPGArrayEditorDialog::Create( wxWindow *parent, // Message if ( !message.empty() ) topsizer->Add( new wxStaticText(this,-1,message), - 0, wxALIGN_LEFT|wxALIGN_CENTRE_VERTICAL|wxALL, spacing ); + 0, wxALIGN_LEFT|wxALL, spacing ); m_elb = new wxEditableListBox(this, wxID_ANY, message, wxDefaultPosition, @@ -2452,7 +2452,7 @@ bool wxPGArrayEditorDialog::Create( wxWindow *parent, buttonSizer->AddButton(new wxButton(this, wxID_CANCEL)); buttonSizer->Realize(); topsizer->Add( buttonSizer, 0, - wxALIGN_RIGHT|wxALIGN_CENTRE_VERTICAL|wxALL, + wxALIGN_RIGHT|wxALL, spacing ); m_elb->SetFocus();