From dd55b5585309111ac546964b97d0ac3d59b5b221 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luk=C3=A1=C5=A1=20Hejl?= Date: Fri, 6 Aug 2021 15:29:09 +0200 Subject: [PATCH] Swapped the position of seed fill and bucket fill inside the multi-material gizmo. Changed the default value for the seed fill angle. --- .../GUI/Gizmos/GLGizmoMmuSegmentation.cpp | 36 +++++++++---------- src/slic3r/GUI/Gizmos/GLGizmoPainterBase.hpp | 2 +- 2 files changed, 19 insertions(+), 19 deletions(-) diff --git a/src/slic3r/GUI/Gizmos/GLGizmoMmuSegmentation.cpp b/src/slic3r/GUI/Gizmos/GLGizmoMmuSegmentation.cpp index 41279c9f1..e61fc2b9f 100644 --- a/src/slic3r/GUI/Gizmos/GLGizmoMmuSegmentation.cpp +++ b/src/slic3r/GUI/Gizmos/GLGizmoMmuSegmentation.cpp @@ -341,24 +341,6 @@ void GLGizmoMmuSegmentation::on_render_input_window(float x, float y, float bott } ImGui::SameLine(tool_type_offset + tool_type_radio_brush + m_imgui->scaled(0.f)); - ImGui::PushItemWidth(tool_type_radio_bucket_fill); - if (m_imgui->radio_button(m_desc["tool_bucket_fill"], m_tool_type == GLGizmoMmuSegmentation::ToolType::BUCKET_FILL)) { - m_tool_type = GLGizmoMmuSegmentation::ToolType::BUCKET_FILL; - for (auto &triangle_selector : m_triangle_selectors) { - triangle_selector->seed_fill_unselect_all_triangles(); - triangle_selector->request_update_render_data(); - } - } - - if (ImGui::IsItemHovered()) { - ImGui::BeginTooltip(); - ImGui::PushTextWrapPos(max_tooltip_width); - ImGui::TextUnformatted(_L("Paints neighboring facets that have the same color.").ToUTF8().data()); - ImGui::PopTextWrapPos(); - ImGui::EndTooltip(); - } - - ImGui::SameLine(tool_type_offset + tool_type_radio_brush + tool_type_radio_bucket_fill + m_imgui->scaled(0.f)); ImGui::PushItemWidth(tool_type_radio_seed_fill); if (m_imgui->radio_button(m_desc["tool_seed_fill"], m_tool_type == GLGizmoMmuSegmentation::ToolType::SEED_FILL)) { m_tool_type = GLGizmoMmuSegmentation::ToolType::SEED_FILL; @@ -376,6 +358,24 @@ void GLGizmoMmuSegmentation::on_render_input_window(float x, float y, float bott ImGui::EndTooltip(); } + ImGui::SameLine(tool_type_offset + tool_type_radio_brush + tool_type_radio_seed_fill + m_imgui->scaled(0.f)); + ImGui::PushItemWidth(tool_type_radio_bucket_fill); + if (m_imgui->radio_button(m_desc["tool_bucket_fill"], m_tool_type == GLGizmoMmuSegmentation::ToolType::BUCKET_FILL)) { + m_tool_type = GLGizmoMmuSegmentation::ToolType::BUCKET_FILL; + for (auto &triangle_selector : m_triangle_selectors) { + triangle_selector->seed_fill_unselect_all_triangles(); + triangle_selector->request_update_render_data(); + } + } + + if (ImGui::IsItemHovered()) { + ImGui::BeginTooltip(); + ImGui::PushTextWrapPos(max_tooltip_width); + ImGui::TextUnformatted(_L("Paints neighboring facets that have the same color.").ToUTF8().data()); + ImGui::PopTextWrapPos(); + ImGui::EndTooltip(); + } + ImGui::Separator(); if(m_tool_type == ToolType::BRUSH) { diff --git a/src/slic3r/GUI/Gizmos/GLGizmoPainterBase.hpp b/src/slic3r/GUI/Gizmos/GLGizmoPainterBase.hpp index 04c74c487..4db17d597 100644 --- a/src/slic3r/GUI/Gizmos/GLGizmoPainterBase.hpp +++ b/src/slic3r/GUI/Gizmos/GLGizmoPainterBase.hpp @@ -114,7 +114,7 @@ protected: bool m_triangle_splitting_enabled = true; ToolType m_tool_type = ToolType::BRUSH; - float m_seed_fill_angle = 0.f; + float m_seed_fill_angle = 30.f; static constexpr float SeedFillAngleMin = 0.0f; static constexpr float SeedFillAngleMax = 90.f;