Merge branch 'main' into skirt-object-fix-pr

This commit is contained in:
SoftFever 2024-09-07 10:57:59 +08:00 committed by GitHub
commit 5b5cd478c2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
160 changed files with 13381 additions and 10798 deletions

View file

@ -468,14 +468,7 @@ void Tab::create_preset_tab()
// so that the cursor jumps to the last item.
// BBS: bold selection
m_tabctrl->Bind(wxEVT_TAB_SEL_CHANGING, [this](wxCommandEvent& event) {
if (m_disable_tree_sel_changed_event)
return;
const auto sel_item = m_tabctrl->GetSelection();
//OutputDebugStringA("wxEVT_TAB_SEL_CHANGING ");
//OutputDebugStringA(m_title.c_str());
//const auto selection = sel_item >= 0 ? m_tabctrl->GetItemText(sel_item) : "";
//OutputDebugString(selection);
//OutputDebugStringA("\n");
m_tabctrl->SetItemBold(sel_item, false);
});
m_tabctrl->Bind(wxEVT_TAB_SEL_CHANGED, [this](wxCommandEvent& event) {
@ -2010,23 +2003,23 @@ void TabPrint::build()
auto page = add_options_page(L("Quality"), "custom-gcode_quality"); // ORCA: icon only visible on placeholders
auto optgroup = page->new_optgroup(L("Layer height"), L"param_layer_height");
optgroup->append_single_option_line("layer_height");
optgroup->append_single_option_line("initial_layer_print_height");
optgroup->append_single_option_line("layer_height","quality_settings_layer_height");
optgroup->append_single_option_line("initial_layer_print_height","quality_settings_layer_height");
optgroup = page->new_optgroup(L("Line width"), L"param_line_width");
optgroup->append_single_option_line("line_width");
optgroup->append_single_option_line("initial_layer_line_width");
optgroup->append_single_option_line("outer_wall_line_width");
optgroup->append_single_option_line("inner_wall_line_width");
optgroup->append_single_option_line("top_surface_line_width");
optgroup->append_single_option_line("sparse_infill_line_width");
optgroup->append_single_option_line("internal_solid_infill_line_width");
optgroup->append_single_option_line("support_line_width");
optgroup->append_single_option_line("line_width","quality_settings_line_width");
optgroup->append_single_option_line("initial_layer_line_width","quality_settings_line_width");
optgroup->append_single_option_line("outer_wall_line_width","quality_settings_line_width");
optgroup->append_single_option_line("inner_wall_line_width","quality_settings_line_width");
optgroup->append_single_option_line("top_surface_line_width","quality_settings_line_width");
optgroup->append_single_option_line("sparse_infill_line_width","quality_settings_line_width");
optgroup->append_single_option_line("internal_solid_infill_line_width","quality_settings_line_width");
optgroup->append_single_option_line("support_line_width","quality_settings_line_width");
optgroup = page->new_optgroup(L("Seam"), L"param_seam");
optgroup->append_single_option_line("seam_position", "seam");
optgroup->append_single_option_line("staggered_inner_seams", "seam");
optgroup->append_single_option_line("seam_gap","seam");
optgroup->append_single_option_line("seam_position", "quality_settings_seam");
optgroup->append_single_option_line("staggered_inner_seams", "quality_settings_seam");
optgroup->append_single_option_line("seam_gap","quality_settings_seam");
optgroup->append_single_option_line("seam_slope_type", "seam#scarf-joint-seam");
optgroup->append_single_option_line("seam_slope_conditional", "seam#scarf-joint-seam");
optgroup->append_single_option_line("scarf_angle_threshold", "seam#scarf-joint-seam");
@ -2038,10 +2031,10 @@ void TabPrint::build()
optgroup->append_single_option_line("seam_slope_steps", "seam#scarf-joint-seam");
optgroup->append_single_option_line("scarf_joint_flow_ratio", "seam#scarf-joint-seam");
optgroup->append_single_option_line("seam_slope_inner_walls", "seam#scarf-joint-seam");
optgroup->append_single_option_line("role_based_wipe_speed","seam");
optgroup->append_single_option_line("wipe_speed", "seam");
optgroup->append_single_option_line("wipe_on_loops","seam");
optgroup->append_single_option_line("wipe_before_external_loop","seam");
optgroup->append_single_option_line("role_based_wipe_speed","quality_settings_seam");
optgroup->append_single_option_line("wipe_speed", "quality_settings_seam");
optgroup->append_single_option_line("wipe_on_loops","quality_settings_seam");
optgroup->append_single_option_line("wipe_before_external_loop","quality_settings_seam");
optgroup = page->new_optgroup(L("Precision"), L"param_precision");
@ -3261,6 +3254,7 @@ void TabFilament::build()
optgroup->append_single_option_line("filament_density");
optgroup->append_single_option_line("filament_shrink");
optgroup->append_single_option_line("filament_shrinkage_compensation_z");
optgroup->append_single_option_line("filament_cost");
//BBS
optgroup->append_single_option_line("temperature_vitrification");
@ -4472,7 +4466,7 @@ void TabPrinter::toggle_options()
toggle_line(el, is_BBL_printer);
// SoftFever: hide non-BBL settings
for (auto el : {"use_firmware_retraction", "use_relative_e_distances", "support_multi_bed_types", "pellet_modded_printer"})
for (auto el : {"use_firmware_retraction", "use_relative_e_distances", "support_multi_bed_types", "pellet_modded_printer", "bed_mesh_max", "bed_mesh_min", "bed_mesh_probe_distance", "adaptive_bed_mesh_margin", "thumbnails"})
toggle_line(el, !is_BBL_printer);
}
@ -4755,19 +4749,28 @@ void Tab::rebuild_page_tree()
// To avoid redundant clear/activate functions call
// suppress activate page before page_tree rebuilding
m_disable_tree_sel_changed_event = true;
m_tabctrl->DeleteAllItems();
int curr_item = 0;
for (auto p : m_pages)
{
if (!p->get_show())
continue;
auto itemId = m_tabctrl->AppendItem(translate_category(p->title(), m_type), p->iconID());
m_tabctrl->SetItemTextColour(itemId, p->get_item_colour() == m_modified_label_clr ? p->get_item_colour() : StateColor(
if (m_tabctrl->GetCount() <= curr_item) {
m_tabctrl->AppendItem(translate_category(p->title(), m_type), p->iconID());
} else {
m_tabctrl->SetItemText(curr_item, translate_category(p->title(), m_type));
}
m_tabctrl->SetItemTextColour(curr_item, p->get_item_colour() == m_modified_label_clr ? p->get_item_colour() : StateColor(
std::make_pair(0x6B6B6C, (int) StateColor::NotChecked),
std::make_pair(p->get_item_colour(), (int) StateColor::Normal)));
if (translate_category(p->title(), m_type) == selected)
item = itemId;
item = curr_item;
curr_item++;
}
while (m_tabctrl->GetCount() > curr_item) {
m_tabctrl->DeleteItem(m_tabctrl->GetCount() - 1);
}
// BBS: on mac, root is selected, this fix it
m_tabctrl->Unselect();
// BBS: not select on hide tab
@ -5282,10 +5285,10 @@ bool Tab::update_current_page_in_background(int& item)
// clear pages from the controlls
// BBS: fix after new layout, clear page in backgroud
if (m_parent->is_active_and_shown_tab((wxPanel*)this))
m_parent->clear_page();
for (auto p : m_pages)
p->clear();
if (m_parent->is_active_and_shown_tab((wxPanel*)this))
m_parent->clear_page();
update_undo_buttons();