diff --git a/src/slic3r/GUI/GLShadersManager.cpp b/src/slic3r/GUI/GLShadersManager.cpp index 454f18ed2..33e5a0954 100644 --- a/src/slic3r/GUI/GLShadersManager.cpp +++ b/src/slic3r/GUI/GLShadersManager.cpp @@ -71,16 +71,16 @@ std::pair GLShadersManager::init() // Since macOS 12 (Monterey), this issue with the opposite direction on Apple's Arm CPU seems to be fixed, and computed // triangle normals inside fragment shader have the right direction. if (platform_flavor() == PlatformFlavor::OSXOnArm && wxPlatformInfo::Get().GetOSMajorVersion() < 12) { - //if (GUI::wxGetApp().is_gl_version_greater_or_equal_to(3, 0)) - valid &= append_shader("mm_gouraud", {"mm_gouraud_wireframe.vs", "mm_gouraud_wireframe.fs"}, {"FLIP_TRIANGLE_NORMALS"sv}); + //if (GUI::wxGetApp().plater() && GUI::wxGetApp().plater()->is_wireframe_enabled()) + // valid &= append_shader("mm_gouraud", {"mm_gouraud_wireframe.vs", "mm_gouraud_wireframe.fs"}, {"FLIP_TRIANGLE_NORMALS"sv}); //else - // valid &= append_shader("mm_gouraud", {"mm_gouraud.vs", "mm_gouraud.fs"}, {"FLIP_TRIANGLE_NORMALS"sv}); + valid &= append_shader("mm_gouraud", {"mm_gouraud.vs", "mm_gouraud.fs"}, {"FLIP_TRIANGLE_NORMALS"sv}); } else { - //if (GUI::wxGetApp().is_gl_version_greater_or_equal_to(3, 0)) - valid &= append_shader("mm_gouraud", {"mm_gouraud_wireframe.vs", "mm_gouraud_wireframe.fs"}); + //if (GUI::wxGetApp().plater() && GUI::wxGetApp().plater()->is_wireframe_enabled()) + // valid &= append_shader("mm_gouraud", {"mm_gouraud_wireframe.vs", "mm_gouraud_wireframe.fs"}); //else - // valid &= append_shader("mm_gouraud", {"mm_gouraud.vs", "mm_gouraud.fs"}); + valid &= append_shader("mm_gouraud", {"mm_gouraud.vs", "mm_gouraud.fs"}); } //BBS: add shader for outline diff --git a/src/slic3r/GUI/Gizmos/GLGizmoMmuSegmentation.cpp b/src/slic3r/GUI/Gizmos/GLGizmoMmuSegmentation.cpp index 45d7373d8..6b5e0d82f 100644 --- a/src/slic3r/GUI/Gizmos/GLGizmoMmuSegmentation.cpp +++ b/src/slic3r/GUI/Gizmos/GLGizmoMmuSegmentation.cpp @@ -321,16 +321,16 @@ void GLGizmoMmuSegmentation::show_tooltip_information(float caption_max, float x std::vector tip_items; switch (m_tool_type) { case ToolType::BRUSH: - tip_items = {"paint", "erase", "cursor_size", "clipping_of_view", "toggle_wireframe"}; + tip_items = {"paint", "erase", "cursor_size", "clipping_of_view"}; break; case ToolType::BUCKET_FILL: - tip_items = {"paint", "erase", "smart_fill_angle", "clipping_of_view", "toggle_wireframe"}; + tip_items = {"paint", "erase", "smart_fill_angle", "clipping_of_view"}; break; case ToolType::SMART_FILL: // TODO: break; case ToolType::GAP_FILL: - tip_items = {"gap_area", "toggle_wireframe"}; + tip_items = {"gap_area"}; break; default: break; @@ -357,7 +357,7 @@ void GLGizmoMmuSegmentation::on_render_input_window(float x, float y, float bott // First calculate width of all the texts that are could possibly be shown. We will decide set the dialog width based on that: const float space_size = m_imgui->get_style_scaling() * 8; - const float clipping_slider_left = std::max(m_imgui->calc_text_size(m_desc.at("clipping_of_view")).x + m_imgui->scaled(1.5f), + const float clipping_slider_left = std::max(m_imgui->calc_text_size(m_desc.at("clipping_of_view")).x + m_imgui->scaled(1.5f), m_imgui->calc_text_size(m_desc.at("reset_direction")).x + m_imgui->scaled(1.5f) + ImGui::GetStyle().FramePadding.x * 2); const float cursor_slider_left = m_imgui->calc_text_size(m_desc.at("cursor_size")).x + m_imgui->scaled(1.5f); const float smart_fill_slider_left = m_imgui->calc_text_size(m_desc.at("smart_fill_angle")).x + m_imgui->scaled(1.5f); diff --git a/src/slic3r/GUI/Plater.cpp b/src/slic3r/GUI/Plater.cpp index 2c257e153..6ae4c87f8 100644 --- a/src/slic3r/GUI/Plater.cpp +++ b/src/slic3r/GUI/Plater.cpp @@ -1082,7 +1082,7 @@ void Sidebar::update_presets(Preset::Type preset_type) Tab* print_tab = wxGetApp().get_tab(Preset::TYPE_PRINT); if (print_tab) { print_tab->get_combo_box()->update(); - } + } break; } case Preset::TYPE_SLA_PRINT: @@ -1097,7 +1097,7 @@ void Sidebar::update_presets(Preset::Type preset_type) { update_all_preset_comboboxes(); p->show_preset_comboboxes(); - + /* update bed shape */ Tab* printer_tab = wxGetApp().get_tab(Preset::TYPE_PRINTER); if (printer_tab) { @@ -7344,6 +7344,7 @@ Plater::Plater(wxWindow *parent, MainFrame *main_frame) , p(new priv(this, main_frame)) { // Initialization performed in the private c-tor + enable_wireframe(false); } bool Plater::Show(bool show)