mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-16 18:12:10 +00:00
Merge branch 'main' into zaa
This commit is contained in:
@@ -903,9 +903,21 @@ void Tab::filter_diff_option(std::vector<std::string> &options)
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (!found) opt = opt.substr(0, hash_pos);
|
||||
if (found) continue;
|
||||
|
||||
// Keep key#index if that exact option is tracked.
|
||||
if (m_options_list.find(opt) != m_options_list.end())
|
||||
continue;
|
||||
|
||||
const std::string base = opt.substr(0, hash_pos);
|
||||
const std::string idx0 = base + "#0";
|
||||
if (m_options_list.find(idx0) != m_options_list.end()) {
|
||||
opt = idx0;
|
||||
continue;
|
||||
}
|
||||
if (m_options_list.find(base) != m_options_list.end())
|
||||
opt = base;
|
||||
}
|
||||
options.erase(std::remove(options.begin(), options.end(), ""), options.end());
|
||||
}
|
||||
|
||||
// Update UI according to changes
|
||||
@@ -974,7 +986,8 @@ void Tab::init_options_list()
|
||||
m_options_list.emplace(opt_key, m_opt_status_value);
|
||||
continue;
|
||||
}
|
||||
if (m_config->option(opt_key)->is_vector())
|
||||
const ConfigOptionDef* opt_def = m_config->def()->get(opt_key);
|
||||
if (m_config->option(opt_key)->is_vector() && !(opt_def && opt_def->gui_flags == "serialized"))
|
||||
m_options_list.emplace(opt_key + "#0", m_opt_status_value);
|
||||
else
|
||||
m_options_list.emplace(opt_key, m_opt_status_value);
|
||||
@@ -987,10 +1000,15 @@ void TabPrinter::init_options_list()
|
||||
if (m_printer_technology == ptFFF)
|
||||
m_options_list.emplace("extruders_count", m_opt_status_value);
|
||||
for (size_t i = 1; i < m_extruders_count; ++i) {
|
||||
auto extruder_page = m_pages[3 + i];
|
||||
for (auto group : extruder_page->m_optgroups) {
|
||||
for (auto & opt : group->opt_map())
|
||||
m_options_list.emplace(opt.first, m_opt_status_value);
|
||||
wxString target_title = wxString::Format("Extruder %d", int(i + 1));
|
||||
for (auto &page : m_pages) {
|
||||
if (page->title() == target_title) {
|
||||
for (auto group : page->m_optgroups) {
|
||||
for (auto &opt : group->opt_map())
|
||||
m_options_list.emplace(opt.first, m_opt_status_value);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1597,7 +1615,7 @@ void Tab::on_value_change(const std::string& opt_key, const boost::any& value)
|
||||
bool wipe_tower_enabled = m_config->option<ConfigOptionBool>("enable_prime_tower")->value;
|
||||
if (boost::any_cast<bool>(value) && !wipe_tower_enabled) {
|
||||
MessageDialog dlg(wxGetApp().plater(),
|
||||
_L("Prime tower is required for clumping detection. There may be flaws on the model without prime tower. Do you still want to enable clumping detection?"),
|
||||
_L("A prime tower is required for clumping detection. There may be flaws on the model without prime tower. Do you still want to enable clumping detection?"),
|
||||
_L("Warning"), wxICON_WARNING | wxYES | wxNO);
|
||||
if (dlg.ShowModal() == wxID_NO) {
|
||||
DynamicPrintConfig new_conf = *m_config;
|
||||
@@ -1706,7 +1724,7 @@ void Tab::on_value_change(const std::string& opt_key, const boost::any& value)
|
||||
"Yes - Change these settings automatically\n"
|
||||
"No - Do not change these settings for me");
|
||||
}
|
||||
MessageDialog dialog(wxGetApp().plater(), msg_text, "Suggestion", wxICON_WARNING | wxYES | wxNO);
|
||||
MessageDialog dialog(wxGetApp().plater(), msg_text, _L("Suggestion"), wxICON_WARNING | wxYES | wxNO);
|
||||
DynamicPrintConfig new_conf = *m_config;
|
||||
if (dialog.ShowModal() == wxID_YES) {
|
||||
auto &filament_presets = Slic3r::GUI::wxGetApp().preset_bundle->filament_presets;
|
||||
@@ -1758,7 +1776,7 @@ void Tab::on_value_change(const std::string& opt_key, const boost::any& value)
|
||||
wxString msg_text = _(
|
||||
L("Infill patterns are typically designed to handle rotation automatically to ensure proper printing and achieve their "
|
||||
"intended effects (e.g., Gyroid, Cubic). Rotating the current sparse infill pattern may lead to insufficient support. "
|
||||
"Please proceed with caution and thoroughly check for any potential printing issues."
|
||||
"Please proceed with caution and thoroughly check for any potential printing issues. "
|
||||
"Are you sure you want to enable this option?"));
|
||||
msg_text += "\n\n" + _(L("Are you sure you want to enable this option?"));
|
||||
MessageDialog dialog(wxGetApp().plater(), msg_text, "", wxICON_WARNING | wxYES | wxNO);
|
||||
@@ -2448,7 +2466,7 @@ void TabPrint::build()
|
||||
optgroup->append_single_option_line("ensure_vertical_shell_thickness", "strength_settings_advanced#ensure-vertical-shell-thickness");
|
||||
|
||||
page = add_options_page(L("Speed"), "custom-gcode_speed"); // ORCA: icon only visible on placeholders
|
||||
optgroup = page->new_optgroup(L("Initial layer speed"), L"param_speed_first", 15);
|
||||
optgroup = page->new_optgroup(L("First layer speed"), L"param_speed_first", 15);
|
||||
optgroup->append_single_option_line("initial_layer_speed", "speed_settings_initial_layer_speed#initial-layer");
|
||||
optgroup->append_single_option_line("initial_layer_infill_speed", "speed_settings_initial_layer_speed#initial-layer-infill");
|
||||
optgroup->append_single_option_line("initial_layer_travel_speed", "speed_settings_initial_layer_speed#initial-layer-travel-speed");
|
||||
@@ -2584,6 +2602,8 @@ void TabPrint::build()
|
||||
optgroup = page->new_optgroup(L("Prime tower"), L"param_tower");
|
||||
optgroup->append_single_option_line("enable_prime_tower", "multimaterial_settings_prime_tower");
|
||||
optgroup->append_single_option_line("prime_tower_skip_points", "multimaterial_settings_prime_tower");
|
||||
optgroup->append_single_option_line("enable_tower_interface_features", "multimaterial_settings_prime_tower");
|
||||
optgroup->append_single_option_line("enable_tower_interface_cooldown_during_tower", "multimaterial_settings_prime_tower");
|
||||
optgroup->append_single_option_line("prime_tower_enable_framework", "multimaterial_settings_prime_tower");
|
||||
optgroup->append_single_option_line("prime_tower_width", "multimaterial_settings_prime_tower#width");
|
||||
optgroup->append_single_option_line("prime_volume", "multimaterial_settings_prime_tower");
|
||||
@@ -4048,6 +4068,11 @@ void TabFilament::build()
|
||||
page = add_options_page(L("Multimaterial"), "custom-gcode_multi_material"); // ORCA: icon only visible on placeholders
|
||||
optgroup = page->new_optgroup(L("Wipe tower parameters"), "param_tower");
|
||||
optgroup->append_single_option_line("filament_minimal_purge_on_wipe_tower", "material_multimaterial#multimaterial-wipe-tower-parameters");
|
||||
optgroup->append_single_option_line("filament_tower_interface_pre_extrusion_dist", "material_multimaterial#multimaterial-wipe-tower-parameters");
|
||||
optgroup->append_single_option_line("filament_tower_interface_pre_extrusion_length", "material_multimaterial#multimaterial-wipe-tower-parameters");
|
||||
optgroup->append_single_option_line("filament_tower_ironing_area", "material_multimaterial#multimaterial-wipe-tower-parameters");
|
||||
optgroup->append_single_option_line("filament_tower_interface_purge_volume", "material_multimaterial#multimaterial-wipe-tower-parameters");
|
||||
optgroup->append_single_option_line("filament_tower_interface_print_temp", "material_multimaterial#multimaterial-wipe-tower-parameters");
|
||||
|
||||
optgroup = page->new_optgroup(L("Multi Filament"));
|
||||
// optgroup->append_single_option_line("filament_flush_temp", "", 0);
|
||||
@@ -4407,7 +4432,6 @@ void TabPrinter::build_fff()
|
||||
|
||||
optgroup->append_single_option_line("use_relative_e_distances", "printer_basic_information_advanced#use-relative-e-distances");
|
||||
optgroup->append_single_option_line("use_firmware_retraction", "printer_basic_information_advanced#use-firmware-retraction");
|
||||
optgroup->append_single_option_line("bed_temperature_formula", "printer_basic_information_advanced#bed-temperature-type");
|
||||
// optgroup->append_single_option_line("spaghetti_detector");
|
||||
optgroup->append_single_option_line("time_cost", "printer_basic_information_advanced#time-cost");
|
||||
|
||||
@@ -4892,6 +4916,7 @@ if (is_marlin_flavor)
|
||||
});
|
||||
};
|
||||
optgroup->append_single_option_line("manual_filament_change", "printer_multimaterial_setup#manual-filament-change");
|
||||
optgroup->append_single_option_line("bed_temperature_formula", "printer_basic_information_advanced#bed-temperature-type");
|
||||
|
||||
optgroup = page->new_optgroup(L("Wipe tower"), "param_tower");
|
||||
optgroup->append_single_option_line("purge_in_prime_tower", "printer_multimaterial_wipe_tower#purge-in-prime-tower");
|
||||
@@ -5621,7 +5646,7 @@ void Tab::rebuild_page_tree()
|
||||
if (sel_item == m_last_select_item)
|
||||
m_last_select_item = item;
|
||||
else
|
||||
m_last_select_item = NULL;
|
||||
m_last_select_item = 0;
|
||||
|
||||
// allow activate page before selection of a page_tree item
|
||||
m_disable_tree_sel_changed_event = false;
|
||||
@@ -6969,6 +6994,8 @@ void Tab::switch_excluder(int extruder_id)
|
||||
{}, {"", "filament_extruder_variant"}, // Preset::TYPE_FILAMENT filament don't use id anymore
|
||||
{}, {"printer_extruder_id", "printer_extruder_variant"}, // Preset::TYPE_PRINTER
|
||||
};
|
||||
if (extruder_id >= nozzle_volumes->size() || extruder_id >= extruders->size())
|
||||
extruder_id = 0;
|
||||
if (m_extruder_switch && m_type != Preset::TYPE_PRINTER) {
|
||||
int current_extruder = m_extruder_switch->GetValue() ? 1 : 0;
|
||||
if (extruder_id == -1)
|
||||
|
||||
Reference in New Issue
Block a user