From 830d89576c6d18e47c2b69a238cf2bd2142d2840 Mon Sep 17 00:00:00 2001 From: YuSanka Date: Thu, 13 Aug 2020 11:14:44 +0200 Subject: [PATCH] Added description line for the disabling of "Object elevation" Deleted mirrored parameter "pad_around_object" from "Support" category --- src/slic3r/GUI/Tab.cpp | 16 +++++++++++++++- src/slic3r/GUI/Tab.hpp | 3 +++ 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/src/slic3r/GUI/Tab.cpp b/src/slic3r/GUI/Tab.cpp index 4f4beb202..9970eb5b9 100644 --- a/src/slic3r/GUI/Tab.cpp +++ b/src/slic3r/GUI/Tab.cpp @@ -3971,9 +3971,16 @@ void TabSLAPrint::build() optgroup->append_single_option_line("support_base_safety_distance"); // Mirrored parameter from Pad page for toggling elevation on the same page - optgroup->append_single_option_line("pad_around_object"); +// optgroup->append_single_option_line("pad_around_object"); optgroup->append_single_option_line("support_object_elevation"); + Line line{ "", "" }; + line.full_width = 1; + line.widget = [this](wxWindow* parent) { + return description_line_widget(parent, &m_support_object_elevation_description_line); + }; + optgroup->append_line(line); + optgroup = page->new_optgroup(L("Connection of the support sticks and junctions")); optgroup->append_single_option_line("support_critical_angle"); optgroup->append_single_option_line("support_max_bridge_length"); @@ -4047,6 +4054,13 @@ void TabSLAPrint::update() m_update_cnt++; m_config_manipulation.update_print_sla_config(m_config, true); + + m_support_object_elevation_description_line->SetText(!m_config->opt_bool("pad_around_object") ? "" : + from_u8((boost::format(_u8L("\"%1%\" is disabled because \"%2%\" is on in \"%3%\" category.\n" + "To enable \"%1%\", please switch off \"%2%\"")) + % _L("Object elevation") % _L("Pad around object") % _L("Pad")).str())); + Layout(); + m_update_cnt--; if (m_update_cnt == 0) { diff --git a/src/slic3r/GUI/Tab.hpp b/src/slic3r/GUI/Tab.hpp index 24f25e2d7..de4c5ccb9 100644 --- a/src/slic3r/GUI/Tab.hpp +++ b/src/slic3r/GUI/Tab.hpp @@ -460,6 +460,9 @@ public: // Tab(parent, _(L("Print Settings")), L("sla_print")) {} Tab(parent, _(L("Print Settings")), Slic3r::Preset::TYPE_SLA_PRINT) {} ~TabSLAPrint() {} + + ogStaticText* m_support_object_elevation_description_line = nullptr; + void build() override; void reload_config() override; void update() override;