Fix wxEXPAND | wxALIGN_* sizer flag conflicts for wxWidgets 3.2+
wxWidgets 3.2+ asserts on invalid sizer flag combinations where wxEXPAND (which fills the entire space in the secondary direction) is combined with wxALIGN_* flags (which are meaningless when expanding). Remove the conflicting wxALIGN_* flags from all 112 occurrences across 21 files, keeping wxEXPAND and any non-conflicting flags intact.
This commit is contained in:
@@ -529,7 +529,7 @@ void Sidebar::priv::layout_printer(bool isBBL, bool isDual)
|
||||
//if (isBBL) {
|
||||
wxBoxSizer *hsizer = new wxBoxSizer(wxHORIZONTAL);
|
||||
hsizer->Add(image_printer, 0, wxLEFT | wxALIGN_LEFT | wxALIGN_CENTER_VERTICAL, FromDIP(10));
|
||||
hsizer->Add(combo_printer, 1, wxEXPAND | wxALL | wxALIGN_LEFT | wxALIGN_CENTER_VERTICAL, FromDIP(2));
|
||||
hsizer->Add(combo_printer, 1, wxEXPAND | wxALL, FromDIP(2));
|
||||
hsizer->AddSpacer(FromDIP(2));
|
||||
hsizer->Add(btn_edit_printer, 0, wxRIGHT | wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL, FromDIP(SidebarProps::IconSpacing()));
|
||||
//hsizer->Add(btn_connect_printer, 0, wxRIGHT | wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL, FromDIP(SidebarProps::IconSpacing()));
|
||||
@@ -2186,7 +2186,7 @@ Sidebar::Sidebar(Plater *parent)
|
||||
|
||||
auto search_sizer = new wxBoxSizer(wxHORIZONTAL);
|
||||
search_sizer->Add(new wxWindow(p->m_search_bar, wxID_ANY, wxDefaultPosition, wxSize(0, 0)), 0, wxEXPAND|wxLEFT|wxRIGHT, FromDIP(1));
|
||||
search_sizer->Add(p->m_search_item, 1, wxEXPAND | wxALL | wxALIGN_CENTER_VERTICAL, FromDIP(2));
|
||||
search_sizer->Add(p->m_search_item, 1, wxEXPAND | wxALL, FromDIP(2));
|
||||
p->m_search_bar->SetSizer(search_sizer);
|
||||
p->m_search_bar->Layout();
|
||||
search_sizer->Fit(p->m_search_bar);
|
||||
|
||||
Reference in New Issue
Block a user