mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-09-23 17:02:39 +00:00
Merge branch 'main' into feat/plugin-lifecycle-evts
This commit is contained in:
+79
-81
@@ -7,6 +7,7 @@
|
||||
#include "libslic3r/FilamentMixer.hpp"
|
||||
#include "libslic3r/Utils.hpp"
|
||||
#include "libslic3r/Model.hpp"
|
||||
#include "libslic3r/PublishSettings.hpp"
|
||||
#include "libslic3r/GCode/GCodeProcessor.hpp"
|
||||
|
||||
#include "Search.hpp"
|
||||
@@ -460,7 +461,7 @@ void Tab::create_preset_tab()
|
||||
// tree
|
||||
m_tabctrl = new TabCtrl(panel, wxID_ANY, wxDefaultPosition, wxSize(20 * m_em_unit, -1),
|
||||
wxTR_NO_BUTTONS | wxTR_HIDE_ROOT | wxTR_SINGLE | wxTR_NO_LINES | wxBORDER_NONE | wxWANTS_CHARS | wxTR_FULL_ROW_HIGHLIGHT);
|
||||
m_tabctrl->Bind(wxEVT_RIGHT_DOWN, [this](auto &e) {}); // disable right select
|
||||
m_tabctrl->Bind(wxEVT_RIGHT_DOWN, [](auto &e) {}); // disable right select
|
||||
m_tabctrl->SetFont(Label::Body_14);
|
||||
//m_left_sizer->Add(m_tabctrl, 1, wxEXPAND);
|
||||
const int img_sz = int(32 * scale_factor + 0.5f);
|
||||
@@ -1992,6 +1993,20 @@ void Tab::on_value_change(const std::string& opt_key, const boost::any& value)
|
||||
|
||||
// reload scene to update timelapse wipe tower
|
||||
if (opt_key == "timelapse_type") {
|
||||
// Smooth timelapse parks the nozzle on the prime tower every layer, so it needs a tower on
|
||||
// every layer. That is exactly what "No sparse layers" removes, and with both on the tower is
|
||||
// planned full height and then dropped on emission. Drop "No sparse layers" and tell the user.
|
||||
if (boost::any_cast<int>(value) == (int) TimelapseType::tlSmooth && m_config->opt_bool("wipe_tower_no_sparse_layers")) {
|
||||
MessageDialog dlg(wxGetApp().plater(),
|
||||
_L("Smooth timelapse needs a prime tower on every layer, which is not compatible with \"No sparse layers\". "
|
||||
"\"No sparse layers\" has been turned off."),
|
||||
_L("Warning"), wxICON_WARNING | wxOK);
|
||||
dlg.ShowModal();
|
||||
DynamicPrintConfig new_conf = *m_config;
|
||||
new_conf.set_key_value("wipe_tower_no_sparse_layers", new ConfigOptionBool(false));
|
||||
m_config_manipulation.apply(m_config, &new_conf);
|
||||
}
|
||||
|
||||
bool wipe_tower_enabled = m_config->option<ConfigOptionBool>("enable_prime_tower")->value;
|
||||
if (!wipe_tower_enabled && boost::any_cast<int>(value) == (int)TimelapseType::tlSmooth) {
|
||||
MessageDialog dlg(wxGetApp().plater(), _L("A prime tower is required for smooth timelapse mode. There may be flaws on the model without prime tower. Do you want to enable the prime tower\?"),
|
||||
@@ -2007,6 +2022,23 @@ void Tab::on_value_change(const std::string& opt_key, const boost::any& value)
|
||||
}
|
||||
}
|
||||
|
||||
// Mirror of the timelapse_type branch above: enabling "No sparse layers" while smooth timelapse
|
||||
// is active would leave the tower on every layer anyway, so fall back to traditional timelapse.
|
||||
if (opt_key == "wipe_tower_no_sparse_layers" && boost::any_cast<bool>(value)) {
|
||||
auto timelapse_type = m_config->option<ConfigOptionEnum<TimelapseType>>("timelapse_type");
|
||||
if (timelapse_type && timelapse_type->value == TimelapseType::tlSmooth) {
|
||||
MessageDialog dlg(wxGetApp().plater(),
|
||||
_L("\"No sparse layers\" is not compatible with smooth timelapse, which needs a prime tower on every layer. "
|
||||
"Timelapse has been switched to traditional mode."),
|
||||
_L("Warning"), wxICON_WARNING | wxOK);
|
||||
dlg.ShowModal();
|
||||
DynamicPrintConfig new_conf = *m_config;
|
||||
new_conf.set_key_value("timelapse_type", new ConfigOptionEnum<TimelapseType>(TimelapseType::tlTraditional));
|
||||
m_config_manipulation.apply(m_config, &new_conf);
|
||||
wxGetApp().plater()->update();
|
||||
}
|
||||
}
|
||||
|
||||
if (opt_key == "print_sequence" && m_config->opt_enum<PrintSequence>("print_sequence") == PrintSequence::ByObject) {
|
||||
auto printer_structure_opt = m_preset_bundle->printers.get_edited_preset().config.option<ConfigOptionEnum<PrinterStructure>>("printer_structure");
|
||||
if (printer_structure_opt && printer_structure_opt->value == PrinterStructure::psI3) {
|
||||
@@ -2175,21 +2207,25 @@ void Tab::on_value_change(const std::string& opt_key, const boost::any& value)
|
||||
|
||||
//Orca: sync filament num if it's a multi tool printer
|
||||
if (opt_key == "extruders_count" && !m_config->opt_bool("single_extruder_multi_material")){
|
||||
auto num_extruder = boost::any_cast<size_t>(value);
|
||||
int old_filament_size = wxGetApp().preset_bundle->filament_presets.size();
|
||||
std::vector<std::string> new_colors;
|
||||
for (int i = old_filament_size; i < num_extruder; ++i) {
|
||||
wxColour new_col = Plater::get_next_color_for_filament();
|
||||
std::string new_color = new_col.GetAsString(wxC2S_HTML_SYNTAX).ToStdString();
|
||||
new_colors.push_back(new_color);
|
||||
const size_t num_extruder = boost::any_cast<size_t>(value);
|
||||
auto *bundle = wxGetApp().preset_bundle;
|
||||
Sidebar &sidebar = wxGetApp().plater()->sidebar();
|
||||
// A tool changer feeds filament N from nozzle N, so the extruder count sizes the physical
|
||||
// run only; mixed slots are virtual and keep the tail. Go one slot at a time through the
|
||||
// sidebar's own +/- calls: they insert ahead of the mixed tail and renumber filament ids,
|
||||
// painted facets, custom g-code and mixed components, which a bulk resize clamps away.
|
||||
// Both also refresh the print tab and export the selections, so nothing to do afterwards.
|
||||
size_t physical = bundle->num_physical_filaments();
|
||||
while (physical != num_extruder) {
|
||||
if (physical < num_extruder)
|
||||
sidebar.add_custom_filament(Plater::get_next_color_for_filament());
|
||||
else
|
||||
sidebar.delete_filament(physical - 1); // physical > num_extruder >= 1
|
||||
const size_t updated = bundle->num_physical_filaments();
|
||||
if (updated == physical)
|
||||
break; // the call declined, e.g. the total slot limit - do not spin
|
||||
physical = updated;
|
||||
}
|
||||
// Mixed-color slots are virtual filaments at the tail of the list with no nozzle of their
|
||||
// own, so they are carried on top of the new extruder count instead of being truncated.
|
||||
const size_t total_filaments = num_extruder + wxGetApp().preset_bundle->num_mixed_filaments();
|
||||
wxGetApp().preset_bundle->set_num_filaments(total_filaments, new_colors);
|
||||
wxGetApp().plater()->on_filament_count_change(total_filaments);
|
||||
wxGetApp().get_tab(Preset::TYPE_PRINT)->update();
|
||||
wxGetApp().preset_bundle->export_selections(*wxGetApp().app_config);
|
||||
}
|
||||
|
||||
//Orca: disable purge_in_prime_tower if single_extruder_multi_material is disabled
|
||||
@@ -2665,6 +2701,8 @@ void TabPrint::build()
|
||||
optgroup->append_single_option_line("role_based_wipe_speed","quality_settings_seam#role-based-wipe-speed");
|
||||
optgroup->append_single_option_line("wipe_speed", "quality_settings_seam#wipe-speed");
|
||||
optgroup->append_single_option_line("wipe_on_loops","quality_settings_seam#wipe-on-loop-inward-movement");
|
||||
optgroup->append_single_option_line("wipe_inward", "quality_settings_seam#wipe-inward");
|
||||
optgroup->append_single_option_line("wipe_inward_distance", "quality_settings_seam#wipe-inward");
|
||||
optgroup->append_single_option_line("wipe_before_external_loop","quality_settings_seam#wipe-before-external");
|
||||
|
||||
|
||||
@@ -2757,6 +2795,7 @@ void TabPrint::build()
|
||||
|
||||
optgroup = page->new_optgroup(L("Overhangs"), L"param_overhang");
|
||||
optgroup->append_single_option_line("detect_overhang_wall", "quality_settings_overhangs#detect-overhang-wall");
|
||||
optgroup->append_single_option_line("unsupported_wall_last", "quality_settings_overhangs#unsupported-wall-last");
|
||||
optgroup->append_single_option_line("make_overhang_printable", "quality_settings_overhangs#make-overhang-printable");
|
||||
optgroup->append_single_option_line("make_overhang_printable_angle", "quality_settings_overhangs#maximum-angle");
|
||||
optgroup->append_single_option_line("make_overhang_printable_hole_size", "quality_settings_overhangs#hole-area");
|
||||
@@ -3020,6 +3059,8 @@ void TabPrint::build()
|
||||
optgroup = page->new_optgroup(L("Advanced"), L"advanced");
|
||||
optgroup->append_single_option_line("interlocking_beam", "multimaterial_settings_advanced#interlocking-beam");
|
||||
optgroup->append_single_option_line("toolchange_ordering", "multimaterial_settings_advanced#toolchange-ordering");
|
||||
optgroup->append_single_option_line("toolchange_cyclic_order", "multimaterial_settings_advanced#toolchange-order");
|
||||
optgroup->append_single_option_line("toolchange_cyclic_first_layer", "multimaterial_settings_advanced#toolchange-order");
|
||||
optgroup->append_single_option_line("interface_shells", "multimaterial_settings_advanced#interface-shells");
|
||||
optgroup->append_single_option_line("mmu_segmented_region_max_width", "multimaterial_settings_advanced#maximum-width-of-segmented-region");
|
||||
optgroup->append_single_option_line("mmu_segmented_region_interlocking_depth", "multimaterial_settings_advanced#interlocking-depth-of-segmented-region");
|
||||
@@ -5025,28 +5066,12 @@ void TabPrinter::build_fff()
|
||||
auto registered_printer_agents = NetworkAgentFactory::get_registered_printer_agents();
|
||||
if (!registered_printer_agents.empty())
|
||||
{
|
||||
ConfigOptionDef def;
|
||||
def.type = coString;
|
||||
def.gui_type = ConfigOptionDef::GUIType::printer_agent_select;
|
||||
def.width = 3 * Field::def_width_wider() / 2;
|
||||
def.label = L("Printer Agent");
|
||||
def.tooltip = L("Select the network agent implementation for printer communication. "
|
||||
option = optgroup->get_option("printer_agent");
|
||||
option.opt.gui_type = ConfigOptionDef::GUIType::printer_agent_select;
|
||||
option.opt.width = 3 * Field::def_width_wider() / 2;
|
||||
option.opt.tooltip = L("Select the network agent implementation for printer communication. "
|
||||
"Available agents are registered at startup.");
|
||||
def.mode = comAdvanced;
|
||||
|
||||
// Create the field without get_option() so it is not registered in m_opt_map.
|
||||
// ConfigOptionsGroup handles printer_agent before the generic mapped write path.
|
||||
Line agent_line = optgroup->create_single_option_line(Option(def, "printer_agent"));
|
||||
optgroup->append_line(agent_line);
|
||||
if (Field* agent_field = get_field("printer_agent"))
|
||||
{
|
||||
if (auto* choice = dynamic_cast<PrinterAgentChoice*>(agent_field); choice && choice->getWindow())
|
||||
choice->set_value(m_config->opt_string("printer_agent"), false);
|
||||
}
|
||||
|
||||
// Register by hand so the UnsavedChanges dialog can render a row for it.
|
||||
wxGetApp().sidebar().get_searcher().add_key("printer_agent", m_type, optgroup->title,
|
||||
optgroup->config_category());
|
||||
optgroup->append_single_option_line(option);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5117,6 +5142,7 @@ void TabPrinter::build_fff()
|
||||
|
||||
optgroup = page->new_optgroup(L("Extruder Clearance"), "param_extruder_clearance");
|
||||
optgroup->append_single_option_line("extruder_clearance_radius", "printer_basic_information_extruder_clearance#radius");
|
||||
optgroup->append_single_option_line("extruder_clearance_dist_to_rod", "printer_basic_information_extruder_clearance#distance-to-rod");
|
||||
optgroup->append_single_option_line("extruder_clearance_height_to_rod", "printer_basic_information_extruder_clearance#height-to-rod");
|
||||
optgroup->append_single_option_line("extruder_clearance_height_to_lid", "printer_basic_information_extruder_clearance#height-to-lid");
|
||||
|
||||
@@ -5127,7 +5153,7 @@ void TabPrinter::build_fff()
|
||||
optgroup->append_single_option_line("adaptive_bed_mesh_margin", "printer_basic_information_adaptive_bed_mesh#mesh-margin");
|
||||
|
||||
optgroup = page->new_optgroup(L("Accessory"), "param_accessory");
|
||||
optgroup->append_single_option_line("nozzle_type", "printer_basic_information_accessory#nozzle-type");
|
||||
optgroup->append_single_option_line("nozzle_type", "printer_basic_information_accessory#nozzle-type", 0);
|
||||
optgroup->append_single_option_line("nozzle_hrc", "printer_basic_information_accessory#nozzle-hrc");
|
||||
optgroup->append_single_option_line("auxiliary_fan", "printer_basic_information_accessory#auxiliary-part-cooling-fan");
|
||||
optgroup->append_single_option_line("fan_direction");
|
||||
@@ -5696,26 +5722,16 @@ if (is_marlin_flavor)
|
||||
optgroup->append_single_option_line("extruder_offset", "printer_extruder_basic_information#extruder-offset-position", extruder_idx);
|
||||
|
||||
//BBS: don't show retract related config menu in machine page
|
||||
// These optgroups are built from publishable_printer_retraction/z_hop_options() so the
|
||||
// published-3MF printer allowlist (their union in libslic3r/PublishSettings.hpp) can
|
||||
// never drift from what the machine page actually shows.
|
||||
optgroup = page->new_optgroup(L("Retraction"), L"param_retraction");
|
||||
optgroup->append_single_option_line("retraction_length", "printer_extruder_retraction#length", extruder_idx);
|
||||
optgroup->append_single_option_line("retract_restart_extra", "printer_extruder_retraction#extra-length-on-restart", extruder_idx);
|
||||
optgroup->append_single_option_line("retraction_speed", "printer_extruder_retraction#retraction-speed", extruder_idx);
|
||||
optgroup->append_single_option_line("deretraction_speed", "printer_extruder_retraction#deretraction-speed", extruder_idx);
|
||||
optgroup->append_single_option_line("retraction_minimum_travel", "printer_extruder_retraction#travel-distance-threshold", extruder_idx);
|
||||
optgroup->append_single_option_line("retract_when_changing_layer", "printer_extruder_retraction#retract-on-layer-change", extruder_idx);
|
||||
optgroup->append_single_option_line("wipe", "printer_extruder_retraction#wipe-while-retracting", extruder_idx);
|
||||
optgroup->append_single_option_line("wipe_distance", "printer_extruder_retraction#wipe-distance", extruder_idx);
|
||||
optgroup->append_single_option_line("retract_before_wipe", "printer_extruder_retraction#retract-amount-before-wipe", extruder_idx);
|
||||
// Orca
|
||||
optgroup->append_single_option_line("retract_after_wipe", "printer_extruder_retraction#retract-amount-after-wipe", extruder_idx);
|
||||
for (const PublishablePrinterOption& opt : publishable_printer_retraction_options())
|
||||
optgroup->append_single_option_line(opt.key, opt.icon, extruder_idx);
|
||||
|
||||
optgroup = page->new_optgroup(L("Z-Hop"), L"param_extruder_lift_enforcement");
|
||||
optgroup->append_single_option_line("retract_lift_enforce", "printer_extruder_z_hop#on-surfaces", extruder_idx);
|
||||
optgroup->append_single_option_line("z_hop_types", "printer_extruder_z_hop#z-hop-type", extruder_idx);
|
||||
optgroup->append_single_option_line("z_hop", "printer_extruder_z_hop#z-hop-height", extruder_idx);
|
||||
optgroup->append_single_option_line("travel_slope", "printer_extruder_z_hop#traveling-angle", extruder_idx);
|
||||
optgroup->append_single_option_line("retract_lift_above", "printer_extruder_z_hop#only-lift-z-above", extruder_idx);
|
||||
optgroup->append_single_option_line("retract_lift_below", "printer_extruder_z_hop#only-lift-z-below", extruder_idx);
|
||||
for (const PublishablePrinterOption& opt : publishable_printer_z_hop_options())
|
||||
optgroup->append_single_option_line(opt.key, opt.icon, extruder_idx);
|
||||
|
||||
optgroup = page->new_optgroup(L("Retraction when switching material"), L"param_retraction_material_change");
|
||||
optgroup->append_single_option_line("retract_length_toolchange", "printer_extruder_retraction#retraction-when-switching-materials", extruder_idx);
|
||||
@@ -5918,15 +5934,6 @@ void TabPrinter::reload_config()
|
||||
if (m_active_page && m_active_page->title() == "Multimaterial")
|
||||
m_active_page->set_value("extruders_count", int(m_extruders_count));
|
||||
|
||||
// m_opt_map-driven reload does not cover printer_agent, so sync this custom field explicitly.
|
||||
if (Field* agent_field = get_field("printer_agent"))
|
||||
{
|
||||
if (auto* choice = dynamic_cast<PrinterAgentChoice*>(agent_field); choice && choice->getWindow())
|
||||
{
|
||||
const std::string selected_agent = m_config->opt_string("printer_agent");
|
||||
choice->set_value(selected_agent, false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void TabPrinter::activate_selected_page(std::function<void()> throw_if_canceled)
|
||||
@@ -5938,15 +5945,6 @@ void TabPrinter::activate_selected_page(std::function<void()> throw_if_canceled)
|
||||
if (m_active_page && m_active_page->title() == "Multimaterial")
|
||||
m_active_page->set_value("extruders_count", int(m_extruders_count));
|
||||
|
||||
// m_opt_map-driven reload does not cover printer_agent, so sync this custom field explicitly.
|
||||
if (Field* agent_field = get_field("printer_agent"))
|
||||
{
|
||||
if (auto* choice = dynamic_cast<PrinterAgentChoice*>(agent_field); choice && choice->getWindow())
|
||||
{
|
||||
const std::string selected_agent = m_config->opt_string("printer_agent");
|
||||
choice->set_value(selected_agent, false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void TabPrinter::clear_pages()
|
||||
@@ -6072,7 +6070,7 @@ void TabPrinter::toggle_options()
|
||||
auto nozzle_volumes = m_preset_bundle->project_config.option<ConfigOptionEnumsGeneric>("nozzle_volume_type");
|
||||
auto extruders = m_config->option<ConfigOptionEnumsGeneric>("extruder_type");
|
||||
auto get_index_for_extruder =
|
||||
[this, &extruders, &nozzle_volumes](int extruder_id, int stride = 1) {
|
||||
[this, &extruders](int extruder_id, int stride = 1) {
|
||||
return m_config->get_index_for_extruder(extruder_id + 1, "printer_extruder_id",
|
||||
ExtruderType(extruders->values[extruder_id]), get_actual_nozzle_volume_type(extruder_id), "printer_extruder_variant", stride);
|
||||
};
|
||||
@@ -7541,7 +7539,7 @@ void Tab::delete_preset()
|
||||
for (auto &preset2 : *m_presets)
|
||||
if (preset2.inherits() == current_preset.name) {
|
||||
++count;
|
||||
presets += "\n - " + preset2.name;
|
||||
presets += "\n - " + from_u8(preset2.name);
|
||||
}
|
||||
if (count > 0) {
|
||||
msg = _L("Presets inherited by other presets cannot be deleted!");
|
||||
@@ -7724,18 +7722,18 @@ wxSizer* Tab::compatible_widget_create(wxWindow* parent, PresetDependencies &dep
|
||||
this->update_changed_ui();
|
||||
};
|
||||
|
||||
deps.checkbox_title->Bind(wxEVT_LEFT_DOWN,([this, &deps, on_toggle](wxMouseEvent& e) {
|
||||
deps.checkbox_title->Bind(wxEVT_LEFT_DOWN,([&deps, on_toggle](wxMouseEvent& e) {
|
||||
if (e.GetEventType() == wxEVT_LEFT_DCLICK) return;
|
||||
on_toggle(!deps.checkbox->GetValue());
|
||||
e.Skip();
|
||||
}));
|
||||
|
||||
deps.checkbox_title->Bind(wxEVT_LEFT_DCLICK,([this, &deps, on_toggle](wxMouseEvent& e) {
|
||||
deps.checkbox_title->Bind(wxEVT_LEFT_DCLICK,([&deps, on_toggle](wxMouseEvent& e) {
|
||||
on_toggle(!deps.checkbox->GetValue());
|
||||
e.Skip();
|
||||
}));
|
||||
|
||||
deps.checkbox->Bind(wxEVT_TOGGLEBUTTON, ([this, on_toggle](wxCommandEvent& e) {
|
||||
deps.checkbox->Bind(wxEVT_TOGGLEBUTTON, ([on_toggle](wxCommandEvent& e) {
|
||||
on_toggle(e.IsChecked());
|
||||
e.Skip();
|
||||
}), deps.checkbox->GetId());
|
||||
@@ -8317,7 +8315,7 @@ void Tab::switch_excluder(int extruder_id, bool reload)
|
||||
return;
|
||||
}
|
||||
auto get_index_for_extruder =
|
||||
[this, &extruders, &nozzle_volumes, variant_keys = extruder_variant_keys[m_type >= Preset::TYPE_COUNT ? Preset::TYPE_PRINT : m_type]](int extruder_id, int stride = 1) {
|
||||
[this, &extruders, variant_keys = extruder_variant_keys[m_type >= Preset::TYPE_COUNT ? Preset::TYPE_PRINT : m_type]](int extruder_id, int stride = 1) {
|
||||
return m_config->get_index_for_extruder(extruder_id + 1, variant_keys.first,
|
||||
ExtruderType(extruders->values[extruder_id]), get_actual_nozzle_volume_type(extruder_id), variant_keys.second, stride);
|
||||
};
|
||||
@@ -8374,7 +8372,7 @@ void Tab::sync_excluder()
|
||||
auto nozzle_volumes = m_preset_bundle->project_config.option<ConfigOptionEnumsGeneric>("nozzle_volume_type");
|
||||
auto extruders = printer_preset.config.option<ConfigOptionEnumsGeneric>("extruder_type");
|
||||
auto get_index_for_extruder =
|
||||
[this, &extruders, &nozzle_volumes, variant_keys = extruder_variant_keys[m_type >= Preset::TYPE_COUNT ? Preset::TYPE_PRINT : m_type]](int extruder_id, NozzleVolumeType nozzle_type) {
|
||||
[this, &extruders, variant_keys = extruder_variant_keys[m_type >= Preset::TYPE_COUNT ? Preset::TYPE_PRINT : m_type]](int extruder_id, NozzleVolumeType nozzle_type) {
|
||||
return m_config->get_index_for_extruder(extruder_id + 1, variant_keys.first,
|
||||
ExtruderType(extruders->values[extruder_id]), nozzle_type, variant_keys.second);
|
||||
};
|
||||
@@ -8415,7 +8413,7 @@ void Tab::sync_excluder()
|
||||
}
|
||||
}
|
||||
if (config_to_apply.empty()) {
|
||||
MessageDialog md(wxGetApp().plater(), _L("No modifications need to be copied."), _L("Copy paramters"), wxICON_INFORMATION | wxOK);
|
||||
MessageDialog md(wxGetApp().plater(), _L("No modifications need to be copied."), _L("Copy parameters"), wxICON_INFORMATION | wxOK);
|
||||
md.ShowModal();
|
||||
return;
|
||||
}
|
||||
@@ -8423,7 +8421,7 @@ void Tab::sync_excluder()
|
||||
std::string pt = m_preset_bundle->printers.get_edited_preset().get_printer_type(m_preset_bundle);
|
||||
std::string active_nozzle_name = DevPrinterConfigUtil::get_toolhead_display_name(pt, active_index, ToolHeadComponent::Nozzle, ToolHeadNameCase::LowerCase);
|
||||
std::string other_nozzle_name = DevPrinterConfigUtil::get_toolhead_display_name(pt, 1 - active_index, ToolHeadComponent::Nozzle, ToolHeadNameCase::LowerCase);
|
||||
wxString title = wxString::Format(_L("Modify paramters of %s"), _L(active_nozzle_name));
|
||||
wxString title = wxString::Format(_L("Modify parameters of %s"), _L(active_nozzle_name));
|
||||
wxString header = wxString::Format(_L("Do you want to modify the following parameters of the %s to that of the %s?"),
|
||||
_L(active_nozzle_name), _L(other_nozzle_name));
|
||||
UnsavedChangesDialog dlg(title, header, &config_origin, from_index, dest_index, active_index == 0, active_nozzle);
|
||||
|
||||
Reference in New Issue
Block a user