mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-10-02 05:11:00 +00:00
Merge branch '2.2.3' into dev_upgrade_alves
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -1747,8 +1747,8 @@ wxBoxSizer* MainFrame::create_side_tools()
|
||||
{
|
||||
SidePopup* p = new SidePopup(this);
|
||||
|
||||
if (wxGetApp().preset_bundle
|
||||
&& !wxGetApp().preset_bundle->is_bbl_vendor()) {
|
||||
// if (wxGetApp().preset_bundle && !wxGetApp().preset_bundle->is_bbl_vendor())
|
||||
if (0) {
|
||||
// ThirdParty Buttons
|
||||
SideButton* export_gcode_btn = new SideButton(p, _L("Export G-code file"), "");
|
||||
export_gcode_btn->SetCornerRadius(0);
|
||||
@@ -1775,15 +1775,10 @@ wxBoxSizer* MainFrame::create_side_tools()
|
||||
|
||||
p->append_button(send_gcode_btn);
|
||||
p->append_button(export_gcode_btn);
|
||||
}
|
||||
else {
|
||||
//Snapmaker Orca Buttons
|
||||
SideButton* print_plate_btn = new SideButton(p, _L("Print plate"), "");
|
||||
} else {
|
||||
SideButton* print_plate_btn = new SideButton(p, _L("Print"), "");
|
||||
print_plate_btn->SetCornerRadius(0);
|
||||
|
||||
SideButton* send_to_printer_btn = new SideButton(p, _L("Send"), "");
|
||||
send_to_printer_btn->SetCornerRadius(0);
|
||||
|
||||
SideButton* export_sliced_file_btn = new SideButton(p, _L("Export plate sliced file"), "");
|
||||
export_sliced_file_btn->SetCornerRadius(0);
|
||||
|
||||
@@ -1791,39 +1786,8 @@ wxBoxSizer* MainFrame::create_side_tools()
|
||||
export_all_sliced_file_btn->SetCornerRadius(0);
|
||||
|
||||
print_plate_btn->Bind(wxEVT_BUTTON, [this, p](wxCommandEvent&) {
|
||||
m_print_btn->SetLabel(_L("Print plate"));
|
||||
m_print_select = ePrintPlate;
|
||||
m_print_enable = get_enable_print_status();
|
||||
m_print_btn->Enable(m_print_enable);
|
||||
this->Layout();
|
||||
p->Dismiss();
|
||||
});
|
||||
|
||||
SideButton* print_all_btn = new SideButton(p, _L("Print all"), "");
|
||||
print_all_btn->SetCornerRadius(0);
|
||||
print_all_btn->Bind(wxEVT_BUTTON, [this, p](wxCommandEvent&) {
|
||||
m_print_btn->SetLabel(_L("Print all"));
|
||||
m_print_select = ePrintAll;
|
||||
m_print_enable = get_enable_print_status();
|
||||
m_print_btn->Enable(m_print_enable);
|
||||
this->Layout();
|
||||
p->Dismiss();
|
||||
});
|
||||
|
||||
send_to_printer_btn->Bind(wxEVT_BUTTON, [this, p](wxCommandEvent&) {
|
||||
m_print_btn->SetLabel(_L("Send"));
|
||||
m_print_select = eSendToPrinter;
|
||||
m_print_enable = get_enable_print_status();
|
||||
m_print_btn->Enable(m_print_enable);
|
||||
this->Layout();
|
||||
p->Dismiss();
|
||||
});
|
||||
|
||||
SideButton* send_to_printer_all_btn = new SideButton(p, _L("Send all"), "");
|
||||
send_to_printer_all_btn->SetCornerRadius(0);
|
||||
send_to_printer_all_btn->Bind(wxEVT_BUTTON, [this, p](wxCommandEvent&) {
|
||||
m_print_btn->SetLabel(_L("Send all"));
|
||||
m_print_select = eSendToPrinterAll;
|
||||
m_print_btn->SetLabel(_L("Print"));
|
||||
m_print_select = eSendGcode;
|
||||
m_print_enable = get_enable_print_status();
|
||||
m_print_btn->Enable(m_print_enable);
|
||||
this->Layout();
|
||||
@@ -1867,13 +1831,7 @@ wxBoxSizer* MainFrame::create_side_tools()
|
||||
}
|
||||
|
||||
p->append_button(print_plate_btn);
|
||||
if (support_print_all) {
|
||||
p->append_button(print_all_btn);
|
||||
}
|
||||
if (support_send) {
|
||||
p->append_button(send_to_printer_btn);
|
||||
p->append_button(send_to_printer_all_btn);
|
||||
}
|
||||
|
||||
if (enable_multi_machine) {
|
||||
SideButton* print_multi_machine_btn = new SideButton(p, _L("Send to Multi-device"), "");
|
||||
print_multi_machine_btn->SetCornerRadius(0);
|
||||
|
||||
@@ -4948,8 +4948,8 @@ std::vector<size_t> Plater::priv::load_files(const std::vector<fs::path>& input_
|
||||
|
||||
if (is_snapmaker_u1) {
|
||||
if (q->get_notification_manager()) {
|
||||
std::string warning_text = _u8L("Warning: Printing by object with caution. This function may cause the print head to collide with printed parts during switching.");
|
||||
q->get_notification_manager()->push_plater_error_notification(warning_text);
|
||||
wxString warning_text = _L("Printing by object with caution. This function may cause the print head to collide with printed parts during switching.");
|
||||
q->get_notification_manager()->push_plater_error_notification(warning_text.ToStdString());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1567,16 +1567,16 @@ void Tab::on_value_change(const std::string& opt_key, const boost::any& value)
|
||||
if (is_snapmaker_u1) {
|
||||
// Show red warning notification
|
||||
if (wxGetApp().plater() && wxGetApp().plater()->get_notification_manager()) {
|
||||
std::string warning_text = _u8L("Warning: Printing by object with caution. This function may cause the print head to collide with printed parts during switching.");
|
||||
wxGetApp().plater()->get_notification_manager()->push_plater_error_notification(warning_text);
|
||||
wxString warning_text = _L("Printing by object with caution. This function may cause the print head to collide with printed parts during switching.");
|
||||
wxGetApp().plater()->get_notification_manager()->push_plater_error_notification(warning_text.ToStdString());
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
// Clear warning when switching away from ByObject
|
||||
if (wxGetApp().plater() && wxGetApp().plater()->get_notification_manager()) {
|
||||
std::string warning_text = _u8L("Warning: Printing by object with caution. This function may cause the print head to collide with printed parts during switching.");
|
||||
wxGetApp().plater()->get_notification_manager()->close_plater_error_notification(warning_text);
|
||||
wxString warning_text = _L("Printing by object with caution. This function may cause the print head to collide with printed parts during switching.");
|
||||
wxGetApp().plater()->get_notification_manager()->close_plater_error_notification(warning_text.ToStdString());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1056,6 +1056,18 @@ int GuideFrame::LoadProfileData()
|
||||
}
|
||||
loaded_vendors.insert(PresetBundle::ORCA_FILAMENT_LIBRARY);
|
||||
|
||||
// Load Snapmaker vendor first to ensure it appears at the top of the machine list
|
||||
auto sm_bundle_name = boost::filesystem::path(PresetBundle::SM_BUNDLE).replace_extension(".json");
|
||||
if (boost::filesystem::exists(vendor_dir / sm_bundle_name)) {
|
||||
LoadProfileFamily(PresetBundle::SM_BUNDLE, (vendor_dir / sm_bundle_name).string());
|
||||
loaded_vendors.insert(PresetBundle::SM_BUNDLE);
|
||||
} else if (boost::filesystem::exists(rsrc_vendor_dir / sm_bundle_name)) {
|
||||
LoadProfileFamily(PresetBundle::SM_BUNDLE, (rsrc_vendor_dir / sm_bundle_name).string());
|
||||
loaded_vendors.insert(PresetBundle::SM_BUNDLE);
|
||||
}
|
||||
if (m_destroy)
|
||||
return 0;
|
||||
|
||||
//load custom bundle from user data path
|
||||
boost::filesystem::directory_iterator endIter;
|
||||
for (boost::filesystem::directory_iterator iter(vendor_dir); iter != endIter; iter++) {
|
||||
|
||||
Reference in New Issue
Block a user