From e9d26d1a8efdbff8d422c2ea109d886f3da6cfd6 Mon Sep 17 00:00:00 2001 From: Enrico Turri Date: Tue, 2 Oct 2018 14:30:01 +0200 Subject: [PATCH] Fixed wxWidgets warnings due to invalid alignement flags at startup --- src/slic3r/GUI/GUI_Preview.cpp | 28 ++++++---------------------- 1 file changed, 6 insertions(+), 22 deletions(-) diff --git a/src/slic3r/GUI/GUI_Preview.cpp b/src/slic3r/GUI/GUI_Preview.cpp index fc3d362e9..870867218 100644 --- a/src/slic3r/GUI/GUI_Preview.cpp +++ b/src/slic3r/GUI/GUI_Preview.cpp @@ -58,22 +58,6 @@ bool Preview::init(wxNotebook* notebook, DynamicPrintConfig* config, Print* prin if (!Create(notebook, wxID_ANY, wxDefaultPosition, wxDefaultSize)) return false; -// int attribList[] = { WX_GL_RGBA, WX_GL_DOUBLEBUFFER, WX_GL_DEPTH_SIZE, 24, WX_GL_SAMPLE_BUFFERS, GL_TRUE, WX_GL_SAMPLES, 4, 0 }; - -// int wxVersion = wxMAJOR_VERSION * 10000 + wxMINOR_VERSION * 100 + wxRELEASE_NUMBER; -// const AppConfig* app_config = GUI::get_app_config(); -// bool enable_multisample = (app_config != nullptr) && (app_config->get("use_legacy_opengl") != "1") && (wxVersion >= 30003); - -// // if multisample is not enabled or supported by the graphic card, remove it from the attributes list -// bool can_multisample = enable_multisample && wxGLCanvas::IsExtensionSupported("WGL_ARB_multisample"); -// // bool can_multisample = enable_multisample && wxGLCanvas::IsDisplaySupported(attribList); // <<< Alternative method: but IsDisplaySupported() seems not to work -// if (!can_multisample) -// attribList[4] = 0; - -// m_canvas = new wxGLCanvas(this, wxID_ANY, attribList); -// if (m_canvas == nullptr) -// return false; - m_canvas = GLCanvas3DManager::create_wxglcanvas(this); _3DScene::add_canvas(m_canvas); @@ -131,18 +115,18 @@ bool Preview::init(wxNotebook* notebook, DynamicPrintConfig* config, Print* prin wxBoxSizer* bottom_sizer = new wxBoxSizer(wxHORIZONTAL); bottom_sizer->Add(m_label_view_type, 0, wxALIGN_CENTER_VERTICAL, 5); - bottom_sizer->Add(m_choice_view_type, 0, wxEXPAND | wxALL | wxALIGN_CENTER_VERTICAL, 5); + bottom_sizer->Add(m_choice_view_type, 0, wxEXPAND | wxALL, 5); bottom_sizer->AddSpacer(10); bottom_sizer->Add(m_label_show_features, 0, wxALIGN_CENTER_VERTICAL, 5); - bottom_sizer->Add(m_combochecklist_features, 0, wxEXPAND | wxALL | wxALIGN_CENTER_VERTICAL, 5); + bottom_sizer->Add(m_combochecklist_features, 0, wxEXPAND | wxALL, 5); bottom_sizer->AddSpacer(20); - bottom_sizer->Add(m_checkbox_travel, 0, wxEXPAND | wxALL | wxALIGN_CENTER_VERTICAL, 5); + bottom_sizer->Add(m_checkbox_travel, 0, wxEXPAND | wxALL, 5); bottom_sizer->AddSpacer(10); - bottom_sizer->Add(m_checkbox_retractions, 0, wxEXPAND | wxALL | wxALIGN_CENTER_VERTICAL, 5); + bottom_sizer->Add(m_checkbox_retractions, 0, wxEXPAND | wxALL, 5); bottom_sizer->AddSpacer(10); - bottom_sizer->Add(m_checkbox_unretractions, 0, wxEXPAND | wxALL | wxALIGN_CENTER_VERTICAL, 5); + bottom_sizer->Add(m_checkbox_unretractions, 0, wxEXPAND | wxALL, 5); bottom_sizer->AddSpacer(10); - bottom_sizer->Add(m_checkbox_shells, 0, wxEXPAND | wxALL | wxALIGN_CENTER_VERTICAL, 5); + bottom_sizer->Add(m_checkbox_shells, 0, wxEXPAND | wxALL, 5); wxBoxSizer* main_sizer = new wxBoxSizer(wxVERTICAL); main_sizer->Add(top_sizer, 1, wxALL | wxEXPAND, 0);