Merge branch 'v1.7.2-remote'

Signed-off-by: SoftFever <softfeverever@gmail.com>

# Conflicts:
#	deps/ZLIB/ZLIB.cmake
#	localization/i18n/OrcaSlicer.pot
#	localization/i18n/de/OrcaSlicer_de.po
#	localization/i18n/en/OrcaSlicer_en.po
#	localization/i18n/es/OrcaSlicer_es.po
#	localization/i18n/fr/OrcaSlicer_fr.po
#	localization/i18n/hu/OrcaSlicer_hu.po
#	localization/i18n/it/OrcaSlicer_it.po
#	localization/i18n/ja/OrcaSlicer_ja.po
#	localization/i18n/ko/OrcaSlicer_ko.po
#	localization/i18n/list.txt
#	localization/i18n/nl/OrcaSlicer_nl.po
#	localization/i18n/sv/OrcaSlicer_sv.po
#	localization/i18n/zh_cn/OrcaSlicer_zh_CN.po
#	resources/calib/PressureAdvance/pa_pattern.3mf
#	resources/handy_models/Disc.stl
#	resources/i18n/de/BambuStudio.mo
#	resources/i18n/en/BambuStudio.mo
#	resources/i18n/es/BambuStudio.mo
#	resources/i18n/fr/BambuStudio.mo
#	resources/i18n/hu/BambuStudio.mo
#	resources/i18n/it/BambuStudio.mo
#	resources/i18n/ja/BambuStudio.mo
#	resources/i18n/ko/BambuStudio.mo
#	resources/i18n/nl/BambuStudio.mo
#	resources/i18n/sv/BambuStudio.mo
#	resources/i18n/zh_cn/BambuStudio.mo
#	resources/profiles/Anycubic.json
#	resources/profiles/Anycubic/machine/Anycubic Kobra 2 0.4 nozzle.json
#	resources/profiles/BBL.json
#	resources/profiles/BBL/filament/Bambu ASA @BBL X1C 0.2 nozzle.json
#	resources/profiles/BBL/filament/Bambu ASA @BBL X1C 0.4 nozzle.json
#	resources/profiles/BBL/filament/Bambu ASA @BBL X1C.json
#	resources/profiles/BBL/filament/Bambu PA-CF @base.json
#	resources/profiles/BBL/filament/Bambu PA6-CF @BBL X1C.json
#	resources/profiles/BBL/filament/Bambu PA6-CF @base.json
#	resources/profiles/BBL/filament/Bambu PETG-CF @BBL X1C.json
#	resources/profiles/BBL/filament/Bambu Support W @BBL X1.json
#	resources/profiles/BBL/filament/Bambu TPU 95A @BBL X1.json
#	resources/profiles/BBL/filament/Generic HIPS @BBL X1C 0.2 nozzle.json
#	resources/profiles/BBL/filament/Generic HIPS @BBL X1C.json
#	resources/profiles/BBL/filament/Generic PA-CF.json
#	resources/profiles/BBL/filament/Generic PC.json
#	resources/profiles/BBL/filament/Generic PETG-CF @BBL X1C.json
#	resources/profiles/BBL/filament/Generic PLA @0.2 nozzle.json
#	resources/profiles/BBL/filament/Generic PLA High Speed @BBL P1P 0.2 nozzle.json
#	resources/profiles/BBL/filament/Generic PLA High Speed @BBL P1P.json
#	resources/profiles/BBL/filament/Generic PLA High Speed @BBL X1C 0.2 nozzle.json
#	resources/profiles/BBL/filament/Generic PLA High Speed @BBL X1C.json
#	resources/profiles/BBL/filament/Generic PLA-CF.json
#	resources/profiles/BBL/filament/Generic PLA.json
#	resources/profiles/BBL/filament/Generic TPU.json
#	resources/profiles/BBL/filament/Overture Matte PLA @BBL P1P 0.2 nozzle.json
#	resources/profiles/BBL/filament/Overture Matte PLA @BBL P1P.json
#	resources/profiles/BBL/filament/Overture Matte PLA @BBL X1.json
#	resources/profiles/BBL/filament/Overture Matte PLA @BBL X1C 0.2 nozzle.json
#	resources/profiles/BBL/filament/Overture Matte PLA @BBL X1C.json
#	resources/profiles/BBL/filament/Overture Matte PLA @base.json
#	resources/profiles/BBL/filament/Overture PLA @BBL P1P 0.2 nozzle.json
#	resources/profiles/BBL/filament/Overture PLA @BBL P1P.json
#	resources/profiles/BBL/filament/Overture PLA @BBL X1.json
#	resources/profiles/BBL/filament/Overture PLA @BBL X1C 0.2 nozzle.json
#	resources/profiles/BBL/filament/Overture PLA @BBL X1C.json
#	resources/profiles/BBL/filament/Overture PLA @base.json
#	resources/profiles/BBL/filament/P1P/Bambu TPU 95A @BBL P1P.json
#	resources/profiles/BBL/filament/P1P/Generic PLA @BBL P1P 0.2 nozzle.json
#	resources/profiles/BBL/filament/P1P/Generic TPU @BBL P1P.json
#	resources/profiles/BBL/filament/P1P/eSUN PLA+ @BBL P1P 0.2 nozzle.json
#	resources/profiles/BBL/filament/P1P/eSUN PLA+ @BBL P1P.json
#	resources/profiles/BBL/filament/PolyLite ABS @BBL P1P 0.2 nozzle.json
#	resources/profiles/BBL/filament/PolyLite ABS @BBL P1P.json
#	resources/profiles/BBL/filament/PolyLite ABS @BBL X1C 0.2 nozzle.json
#	resources/profiles/BBL/filament/PolyLite ABS @BBL X1C.json
#	resources/profiles/BBL/filament/PolyLite ABS @base.json
#	resources/profiles/BBL/filament/PolyLite ASA @BBL P1P 0.2 nozzle.json
#	resources/profiles/BBL/filament/PolyLite ASA @BBL P1P.json
#	resources/profiles/BBL/filament/PolyLite ASA @BBL X1C 0.2 nozzle.json
#	resources/profiles/BBL/filament/PolyLite ASA @BBL X1C.json
#	resources/profiles/BBL/filament/PolyLite ASA @base.json
#	resources/profiles/BBL/filament/PolyLite PETG @BBL P1P 0.2 nozzle.json
#	resources/profiles/BBL/filament/PolyLite PETG @BBL P1P.json
#	resources/profiles/BBL/filament/PolyLite PETG @BBL X1C 0.2 nozzle.json
#	resources/profiles/BBL/filament/PolyLite PETG @BBL X1C.json
#	resources/profiles/BBL/filament/PolyLite PETG @base.json
#	resources/profiles/BBL/filament/PolyLite PLA @BBL X1.json
#	resources/profiles/BBL/filament/PolyTerra PLA @BBL X1.json
#	resources/profiles/BBL/filament/eSUN PLA+ @BBL X1.json
#	resources/profiles/BBL/filament/eSUN PLA+ @BBL X1C 0.2 nozzle.json
#	resources/profiles/BBL/filament/eSUN PLA+ @BBL X1C.json
#	resources/profiles/BBL/machine/Bambu Lab P1P 0.2 nozzle.json
#	resources/profiles/BBL/machine/Bambu Lab P1P 0.4 nozzle.json
#	resources/profiles/BBL/machine/Bambu Lab P1P 0.6 nozzle.json
#	resources/profiles/BBL/machine/Bambu Lab P1P 0.8 nozzle.json
#	resources/profiles/BBL/machine/Bambu Lab P1S 0.2 nozzle.json
#	resources/profiles/BBL/machine/Bambu Lab P1S 0.4 nozzle.json
#	resources/profiles/BBL/machine/Bambu Lab P1S 0.6 nozzle.json
#	resources/profiles/BBL/machine/Bambu Lab P1S 0.8 nozzle.json
#	resources/profiles/BBL/machine/Bambu Lab X1 0.2 nozzle.json
#	resources/profiles/BBL/machine/Bambu Lab X1 0.4 nozzle.json
#	resources/profiles/BBL/machine/Bambu Lab X1 0.6 nozzle.json
#	resources/profiles/BBL/machine/Bambu Lab X1 0.8 nozzle.json
#	resources/profiles/BBL/machine/Bambu Lab X1 Carbon 0.2 nozzle.json
#	resources/profiles/BBL/machine/Bambu Lab X1 Carbon 0.4 nozzle.json
#	resources/profiles/BBL/machine/Bambu Lab X1 Carbon 0.6 nozzle.json
#	resources/profiles/BBL/machine/Bambu Lab X1 Carbon 0.8 nozzle.json
#	resources/profiles/BBL/machine/fdm_bbl_3dp_001_common.json
#	resources/profiles/BBL/process/0.06mm Standard @BBL X1C 0.2 nozzle.json
#	resources/profiles/BBL/process/0.08mm Extra Fine @BBL P1P.json
#	resources/profiles/BBL/process/0.08mm Extra Fine @BBL X1C.json
#	resources/profiles/BBL/process/0.08mm Standard @BBL X1C 0.2 nozzle.json
#	resources/profiles/BBL/process/0.10mm Standard @BBL P1P 0.2 nozzle.json
#	resources/profiles/BBL/process/0.10mm Standard @BBL X1C 0.2 nozzle.json
#	resources/profiles/BBL/process/0.12mm Fine @BBL P1P.json
#	resources/profiles/BBL/process/0.12mm Fine @BBL X1C.json
#	resources/profiles/BBL/process/0.12mm Standard @BBL X1C 0.2 nozzle.json
#	resources/profiles/BBL/process/0.14mm Standard @BBL X1C 0.2 nozzle.json
#	resources/profiles/BBL/process/0.16mm Optimal @BBL P1P.json
#	resources/profiles/BBL/process/0.16mm Optimal @BBL X1C.json
#	resources/profiles/BBL/process/0.18mm Standard @BBL X1C 0.6 nozzle.json
#	resources/profiles/BBL/process/0.20mm Standard @BBL P1P.json
#	resources/profiles/BBL/process/0.20mm Standard @BBL X1C.json
#	resources/profiles/BBL/process/0.20mm Strength @BBL P1P.json
#	resources/profiles/BBL/process/0.20mm Strength @BBL X1C.json
#	resources/profiles/BBL/process/0.24mm Draft @BBL P1P.json
#	resources/profiles/BBL/process/0.24mm Draft @BBL X1C.json
#	resources/profiles/BBL/process/0.24mm Standard @BBL X1C 0.6 nozzle.json
#	resources/profiles/BBL/process/0.24mm Standard @BBL X1C 0.8 nozzle.json
#	resources/profiles/BBL/process/0.28mm Extra Draft @BBL P1P.json
#	resources/profiles/BBL/process/0.28mm Extra Draft @BBL X1C.json
#	resources/profiles/BBL/process/0.30mm Standard @BBL P1P 0.6 nozzle.json
#	resources/profiles/BBL/process/0.30mm Standard @BBL X1 0.6 nozzle.json
#	resources/profiles/BBL/process/0.30mm Standard @BBL X1C 0.6 nozzle.json
#	resources/profiles/BBL/process/0.30mm Strength @BBL X1C 0.6 nozzle.json
#	resources/profiles/BBL/process/0.32mm Standard @BBL X1C 0.8 nozzle.json
#	resources/profiles/BBL/process/0.36mm Standard @BBL X1C 0.6 nozzle.json
#	resources/profiles/BBL/process/0.40mm Standard @BBL P1P 0.8 nozzle.json
#	resources/profiles/BBL/process/0.40mm Standard @BBL X1 0.8 nozzle.json
#	resources/profiles/BBL/process/0.40mm Standard @BBL X1C 0.8 nozzle.json
#	resources/profiles/BBL/process/0.42mm Standard @BBL X1C 0.6 nozzle.json
#	resources/profiles/BBL/process/0.48mm Standard @BBL X1C 0.8 nozzle.json
#	resources/profiles/BBL/process/0.56mm Standard @BBL X1C 0.8 nozzle.json
#	resources/profiles/BBL/process/fdm_process_bbl_common.json
#	resources/profiles/Creality.json
#	resources/profiles/Creality/machine/Creality CR-10 Max 0.4 nozzle.json
#	resources/profiles/Creality/machine/Creality CR-10 V2 0.4 nozzle.json
#	resources/profiles/Creality/machine/Creality CR-6 Max 0.2 nozzle.json
#	resources/profiles/Creality/machine/Creality CR-6 Max 0.4 nozzle.json
#	resources/profiles/Creality/machine/Creality CR-6 Max 0.6 nozzle.json
#	resources/profiles/Creality/machine/Creality CR-6 Max 0.8 nozzle.json
#	resources/profiles/Creality/machine/Creality CR-6 SE 0.2 nozzle.json
#	resources/profiles/Creality/machine/Creality CR-6 SE 0.4 nozzle.json
#	resources/profiles/Creality/machine/Creality CR-6 SE 0.6 nozzle.json
#	resources/profiles/Creality/machine/Creality CR-6 SE 0.8 nozzle.json
#	resources/profiles/Creality/machine/Creality Ender-3 S1 0.4 nozzle.json
#	resources/profiles/Creality/machine/Creality Ender-3 S1 Pro 0.4 nozzle.json
#	resources/profiles/Creality/machine/Creality Ender-5 0.4 nozzle.json
#	resources/profiles/Creality/machine/Creality Ender-5 Plus 0.4 nozzle.json
#	resources/profiles/Creality/machine/Creality Ender-5 S1 0.4 nozzle.json
#	resources/profiles/Creality/machine/Creality Ender-5S 0.4 nozzle.json
#	resources/profiles/Creality/machine/Creality Ender-6 0.4 nozzle.json
#	resources/profiles/Elegoo.json
#	resources/profiles/Elegoo/machine/Elegoo Neptune 0.4 nozzle.json
#	resources/profiles/Elegoo/machine/Elegoo Neptune 2 0.4 nozzle.json
#	resources/profiles/Elegoo/machine/Elegoo Neptune 2D 0.4 nozzle.json
#	resources/profiles/Elegoo/machine/Elegoo Neptune 2S 0.4 nozzle.json
#	resources/profiles/Elegoo/machine/Elegoo Neptune 3 0.4 nozzle.json
#	resources/profiles/Elegoo/machine/Elegoo Neptune 3 Max 0.4 nozzle.json
#	resources/profiles/Elegoo/machine/Elegoo Neptune 3 Plus 0.4 nozzle.json
#	resources/profiles/Elegoo/machine/Elegoo Neptune 3 Pro 0.4 nozzle.json
#	resources/profiles/Elegoo/machine/Elegoo Neptune X 0.4 nozzle.json
#	resources/profiles/Prusa.json
#	resources/profiles/Prusa/machine/Prusa MINI 0.4 nozzle.json
#	resources/profiles/Prusa/machine/Prusa MK3S 0.4 nozzle.json
#	resources/profiles/Qidi/machine/Qidi X-CF Pro 0.4 nozzle.json
#	resources/profiles/Qidi/machine/Qidi X-Max 0.4 nozzle.json
#	resources/profiles/Qidi/machine/Qidi X-Max 3 0.4 nozzle.json
#	resources/profiles/Qidi/machine/Qidi X-Plus 0.4 nozzle.json
#	resources/profiles/Qidi/machine/Qidi X-Plus 3 0.4 nozzle.json
#	resources/profiles/Qidi/machine/Qidi X-Smart 3 0.4 nozzle.json
#	resources/profiles/Tronxy.json
#	resources/profiles/Tronxy/machine/Tronxy X5SA 400 0.4 nozzle.json
#	resources/profiles/Tronxy/process/0.08mm Extra Fine @Tronxy.json
#	resources/profiles/Tronxy/process/0.12mm Fine @Tronxy.json
#	resources/profiles/Tronxy/process/0.15mm Optimal @Tronxy.json
#	resources/profiles/Tronxy/process/0.20mm Standard @Tronxy.json
#	resources/profiles/Tronxy/process/0.24mm Draft @Tronxy.json
#	resources/profiles/Tronxy/process/0.28mm Extra Draft @Tronxy.json
#	resources/profiles/Voxelab/machine/Voxelab Aquila X2 0.4 nozzle.json
#	resources/web/data/text.js
#	src/OrcaSlicer.cpp
#	src/libslic3r/GCode.cpp
#	src/libslic3r/GCode/SeamPlacer.cpp
#	src/libslic3r/GCode/SeamPlacer.hpp
#	src/libslic3r/GCodeWriter.cpp
#	src/libslic3r/GCodeWriter.hpp
#	src/libslic3r/Preset.cpp
#	src/libslic3r/PresetBundle.cpp
#	src/libslic3r/Print.cpp
#	src/libslic3r/PrintConfig.cpp
#	src/libslic3r/PrintConfig.hpp
#	src/libslic3r/TreeSupport.cpp
#	src/libslic3r/calib.cpp
#	src/libslic3r/calib.hpp
#	src/slic3r/GUI/BackgroundSlicingProcess.cpp
#	src/slic3r/GUI/BedShapeDialog.cpp
#	src/slic3r/GUI/ConfigManipulation.cpp
#	src/slic3r/GUI/GUI.cpp
#	src/slic3r/GUI/GUI_App.cpp
#	src/slic3r/GUI/GUI_Factories.cpp
#	src/slic3r/GUI/GUI_ObjectList.cpp
#	src/slic3r/GUI/Jobs/ArrangeJob.cpp
#	src/slic3r/GUI/OptionsGroup.cpp
#	src/slic3r/GUI/PartPlate.cpp
#	src/slic3r/GUI/PartPlate.hpp
#	src/slic3r/GUI/Plater.cpp
#	src/slic3r/GUI/StatusPanel.cpp
#	src/slic3r/GUI/Tab.cpp
#	src/slic3r/GUI/Widgets/AMSControl.hpp
#	version.inc
This commit is contained in:
SoftFever 2023-09-29 19:46:49 +08:00
commit b8172316b8
608 changed files with 23446 additions and 10493 deletions

View file

@ -225,14 +225,14 @@ void MachineObjectPanel::doRender(wxDC &dc)
}
auto sizet = dc.GetTextExtent(dev_name);
auto text_end = 0;
if (m_show_edit) {
text_end = size.x - m_unbind_img.GetBmpSize().x - 30;
}
else {
text_end = size.x - m_unbind_img.GetBmpSize().x;
}
wxString finally_name = dev_name;
if (sizet.x > (text_end - left)) {
auto limit_width = text_end - left - dc.GetTextExtent("...").x - 15;
@ -268,7 +268,7 @@ void MachineObjectPanel::doRender(wxDC &dc)
dc.DrawBitmap(m_edit_name_img.bmp(), left, (size.y - m_edit_name_img.GetBmpSize().y) / 2);
}
}
}
void MachineObjectPanel::update_machine_info(MachineObject *info, bool is_my_devices)
@ -867,14 +867,16 @@ void SelectMachinePopup::OnLeftUp(wxMouseEvent &event)
static wxString MACHINE_BED_TYPE_STRING[BED_TYPE_COUNT] = {
//_L("Auto"),
_L("Bambu Cool Plate") + " / " + _L("PLA Plate"),
_L("Bamabu Engineering Plate"),
_L("Bamabu High Temperature Plate")};
_L("Bambu Engineering Plate"),
_L("Bambu Smooth PEI Plate") + "/" + _L("High temperature Plate"),
_L("Bambu Textured PEI Plate")};
static std::string MachineBedTypeString[BED_TYPE_COUNT] = {
//"auto",
"pc",
"pei",
"pe",
"pei",
"pte",
};
void SelectMachineDialog::stripWhiteSpace(std::string& str)
@ -1205,7 +1207,7 @@ SelectMachineDialog::SelectMachineDialog(Plater *plater)
m_sizer_prepare->Add(0, 0, 1, wxTOP, FromDIP(12));
auto hyperlink_sizer = new wxBoxSizer( wxHORIZONTAL );
m_hyperlink = new wxHyperlinkCtrl(m_panel_prepare, wxID_ANY, _L("Can't connect to the printer"), wxT("https://wiki.bambulab.com/en/software/bambu-studio/failed-to-connect-printer"), wxDefaultPosition, wxDefaultSize, wxHL_DEFAULT_STYLE);
m_hyperlink = new wxHyperlinkCtrl(m_panel_prepare, wxID_ANY, _L("Click here if you can't connect to the printer"), wxT("https://wiki.bambulab.com/en/software/bambu-studio/failed-to-connect-printer"), wxDefaultPosition, wxDefaultSize, wxHL_DEFAULT_STYLE);
hyperlink_sizer->Add(m_hyperlink, 0, wxALIGN_CENTER | wxALL, 5);
m_sizer_prepare->Add(hyperlink_sizer, 0, wxALIGN_CENTER | wxALL, 5);
@ -1297,7 +1299,7 @@ SelectMachineDialog::SelectMachineDialog(Plater *plater)
m_st_txt_error_desc = new Label(m_sw_print_failed_info, wxEmptyString);
st_title_error_desc->SetForegroundColour(0x909090);
st_title_error_desc_doc->SetForegroundColour(0x909090);
m_st_txt_error_desc->SetForegroundColour(0x909090);
m_st_txt_error_desc->SetForegroundColour(0x909090);
st_title_error_desc->SetFont(::Label::Body_13);
st_title_error_desc_doc->SetFont(::Label::Body_13);
m_st_txt_error_desc->SetFont(::Label::Body_13);
@ -1314,7 +1316,7 @@ SelectMachineDialog::SelectMachineDialog(Plater *plater)
m_st_txt_extra_info = new Label(m_sw_print_failed_info, wxEmptyString);
st_title_extra_info->SetForegroundColour(0x909090);
st_title_extra_info_doc->SetForegroundColour(0x909090);
m_st_txt_extra_info->SetForegroundColour(0x909090);
m_st_txt_extra_info->SetForegroundColour(0x909090);
st_title_extra_info->SetFont(::Label::Body_13);
st_title_extra_info_doc->SetFont(::Label::Body_13);
m_st_txt_extra_info->SetFont(::Label::Body_13);
@ -1369,7 +1371,7 @@ SelectMachineDialog::SelectMachineDialog(Plater *plater)
m_sizer_main->Add(0, 0, 0, wxEXPAND | wxTOP, FromDIP(11));
m_sizer_main->Add(m_statictext_printer_msg, 0, wxALIGN_CENTER_HORIZONTAL, 0);
m_sizer_main->Add(0, 1, 0, wxTOP, FromDIP(16));
m_sizer_main->Add(m_sizer_select, 0, wxEXPAND | wxLEFT | wxRIGHT, FromDIP(40));
m_sizer_main->Add(m_sizer_select, 0, wxALIGN_CENTER_HORIZONTAL | wxLEFT | wxRIGHT, FromDIP(30));
m_sizer_main->Add(0, 1, 0, wxTOP, FromDIP(10));
m_sizer_main->Add(m_line_schedule, 0, wxEXPAND | wxLEFT | wxRIGHT, FromDIP(30));
m_sizer_main->Add(m_simplebook, 0, wxALIGN_CENTER_HORIZONTAL, 0);
@ -1440,7 +1442,7 @@ void SelectMachineDialog::init_bind()
}
}
}
});
});
m_bitmap_last_plate->Bind(wxEVT_LEFT_DOWN, [this](auto& e) {
if (m_print_plate_idx > 0) {
@ -1541,10 +1543,10 @@ wxWindow *SelectMachineDialog::create_ams_checkbox(wxString title, wxWindow *par
sizer_checkbox->Add(text, 0, wxALIGN_CENTER, 0);
enable_ams = new ScalableBitmap(this, "enable_ams", 16);
auto img_ams_tip = new wxStaticBitmap(checkbox, wxID_ANY, enable_ams->bmp(), wxDefaultPosition, wxSize(FromDIP(16), FromDIP(16)), 0);
img_ams_tip = new wxStaticBitmap(checkbox, wxID_ANY, enable_ams->bmp(), wxDefaultPosition, wxSize(FromDIP(16), FromDIP(16)), 0);
sizer_checkbox->Add(img_ams_tip, 0, wxALIGN_CENTER | wxLEFT, FromDIP(5));
img_ams_tip->Bind(wxEVT_ENTER_WINDOW, [this, img_ams_tip](auto& e) {
img_ams_tip->Bind(wxEVT_ENTER_WINDOW, [this](auto& e) {
wxPoint img_pos = img_ams_tip->ClientToScreen(wxPoint(0, 0));
wxPoint popup_pos(img_pos.x, img_pos.y + img_ams_tip->GetRect().height);
m_mapping_tip_popup.Position(popup_pos, wxSize(0, 0));
@ -1561,7 +1563,6 @@ wxWindow *SelectMachineDialog::create_ams_checkbox(wxString title, wxWindow *par
img_ams_tip->Bind(wxEVT_LEAVE_WINDOW, [this](wxMouseEvent& e) {
m_mapping_tip_popup.Dismiss();
});
ams_tip = img_ams_tip;
checkbox->SetSizer(sizer_checkbox);
checkbox->Layout();
@ -1637,7 +1638,7 @@ wxWindow *SelectMachineDialog::create_item_checkbox(wxString title, wxWindow *pa
config->set_str("print", param, "0");
}
});
text->Bind(wxEVT_LEFT_DOWN, [this, check, param](wxMouseEvent &) {
//if (!m_checkbox_state_list[param]) {return;}
check->SetValue(check->GetValue() ? false : true);
@ -1673,15 +1674,17 @@ void SelectMachineDialog::update_select_layout(MachineObject *obj)
&& obj->is_support_print_with_timelapse()
&& is_show_timelapse()) {
select_timelapse->Show();
update_timelapse_enable_status();
} else {
select_timelapse->Hide();
}
m_sizer_select->Layout();
Layout();
Fit();
}
void SelectMachineDialog::prepare_mode()
void SelectMachineDialog::prepare_mode(bool refresh_button)
{
// disable combobox
m_comboBox_printer->Enable();
@ -1696,7 +1699,9 @@ void SelectMachineDialog::prepare_mode()
if (wxIsBusy())
wxEndBusyCursor();
Enable_Send_Button(true);
if (refresh_button) {
Enable_Send_Button(true);
}
m_status_bar->reset();
if (m_simplebook->GetSelection() != 0) {
@ -1726,7 +1731,7 @@ void SelectMachineDialog::sending_mode()
Fit();
}
if (m_print_page_mode != PrintPageModeSending) {
m_print_page_mode = PrintPageModeSending;
for (auto it = m_materialList.begin(); it != m_materialList.end(); it++) {
@ -2014,12 +2019,6 @@ void SelectMachineDialog::show_status(PrintDialogStatus status, std::vector<wxSt
else
m_comboBox_printer->Enable();
// m_panel_warn m_simplebook
if (status == PrintDialogStatus::PrintStatusSending) {
sending_mode();
} else {
prepare_mode();
}
// other
if (status == PrintDialogStatus::PrintStatusInit) {
@ -2161,6 +2160,30 @@ void SelectMachineDialog::show_status(PrintDialogStatus status, std::vector<wxSt
update_print_status_msg(msg_text, true, true);
Enable_Send_Button(false);
Enable_Refresh_Button(true);
} else if (status == PrintDialogStatus::PrintStatusTimelapseWarning) {
wxString msg_text;
PartPlate *plate = m_plater->get_partplate_list().get_curr_plate();
for (auto warning : plate->get_slice_result()->warnings) {
if (warning.msg == NOT_GENERATE_TIMELAPSE) {
if (warning.error_code == "1001C001") {
msg_text = _L("When enable spiral vase mode, machines with I3 structure will not generate timelapse videos.");
}
else if (warning.error_code == "1001C002") {
msg_text = _L("When print by object, machines with I3 structure will not generate timelapse videos.");
}
}
}
update_print_status_msg(msg_text, true, true);
Enable_Send_Button(true);
Enable_Refresh_Button(true);
}
// m_panel_warn m_simplebook
if (status == PrintDialogStatus::PrintStatusSending) {
sending_mode();
}
else {
prepare_mode(false);
}
}
@ -2260,14 +2283,23 @@ void SelectMachineDialog::on_ok_btn(wxCommandEvent &event)
PartPlate* plate = m_plater->get_partplate_list().get_curr_plate();
for (auto warning : plate->get_slice_result()->warnings) {
if (warning.msg == BED_TEMP_TOO_HIGH_THAN_FILAMENT) {
if ((obj_->printer_type == "BL-P001" || obj_->printer_type == "BL-P002")) {
if ((obj_->get_printer_series() == PrinterSeries::SERIES_X1)) {
confirm_text.push_back(Plater::get_slice_warning_string(warning) + "\n");
has_slice_warnings = true;
}
}
else if (warning.msg == NOT_SUPPORT_TRADITIONAL_TIMELAPSE) {
if (obj_->get_printer_arch() == PrinterArch::ARCH_I3 && m_checkbox_list["timelapse"]->GetValue()) {
confirm_text.push_back(Plater::get_slice_warning_string(warning) + "\n");
has_slice_warnings = true;
}
}
else if (warning.msg == NOT_GENERATE_TIMELAPSE) {
continue;
}
else {
wxString error_info = Plater::get_slice_warning_string(warning);
if (error_info.IsEmpty()) {
@ -2345,7 +2377,7 @@ void SelectMachineDialog::on_ok_btn(wxCommandEvent &event)
else {
this->on_send_print();
}
});
confirm_text.push_back(_L("Please click the confirm button if you still want to proceed with printing.") + "\n");
@ -2939,7 +2971,6 @@ void SelectMachineDialog::on_timer(wxTimerEvent &event)
if (!obj_
|| obj_->amsList.empty()
|| obj_->ams_exist_bits == 0
|| !obj_->m_is_support_show_bak
|| !obj_->ams_support_auto_switch_filament_flag
|| !obj_->ams_auto_switch_filament_flag
|| !obj_->is_function_supported(PrinterFunction::FUNC_FILAMENT_BACKUP)
@ -3028,6 +3059,8 @@ void SelectMachineDialog::update_ams_check(MachineObject* obj)
&& obj->ams_support_use_ams
&& obj->has_ams()) {
select_use_ams->Show();
if (obj->printer_type == "N1") {img_ams_tip->Hide();}
else {img_ams_tip->Show();}
} else {
select_use_ams->Hide();
}
@ -3144,7 +3177,7 @@ void SelectMachineDialog::update_show_status()
}
}
if (is_blocking_printing()) {
if (m_print_type == PrintFromType::FROM_NORMAL && is_blocking_printing()) {
show_status(PrintDialogStatus::PrintStatusUnsupportedPrinter);
return;
}
@ -3173,6 +3206,11 @@ void SelectMachineDialog::update_show_status()
}
}
if (has_timelapse_warning()) {
show_status(PrintDialogStatus::PrintStatusTimelapseWarning);
return;
}
// no ams
if (!obj_->has_ams() || !m_checkbox_list["use_ams"]->GetValue()) {
if (!has_tips(obj_))
@ -3239,6 +3277,35 @@ void SelectMachineDialog::update_show_status()
}
}
bool SelectMachineDialog::has_timelapse_warning()
{
PartPlate *plate = m_plater->get_partplate_list().get_curr_plate();
for (auto warning : plate->get_slice_result()->warnings) {
if (warning.msg == NOT_GENERATE_TIMELAPSE) {
return true;
}
}
return false;
}
void SelectMachineDialog::update_timelapse_enable_status()
{
AppConfig *config = wxGetApp().app_config;
if (!has_timelapse_warning()) {
if (!config || config->get("print", "timelapse") == "0")
m_checkbox_list["timelapse"]->SetValue(false);
else
m_checkbox_list["timelapse"]->SetValue(true);
select_timelapse->Enable(true);
} else {
m_checkbox_list["timelapse"]->SetValue(false);
select_timelapse->Enable(false);
if (config) { config->set_str("print", "timelapse", "0"); }
}
}
bool SelectMachineDialog::is_show_timelapse()
{
auto compare_version = [](const std::string &version1, const std::string &version2) -> bool {
@ -3342,7 +3409,7 @@ void SelectMachineDialog::on_dpi_changed(const wxRect &suggested_rect)
enable_ams_mapping->msw_rescale();
amsmapping_tip->SetBitmap(enable_ams_mapping->bmp());
enable_ams->msw_rescale();
ams_tip->SetBitmap(enable_ams->bmp());
img_ams_tip->SetBitmap(enable_ams->bmp());
m_button_refresh->SetMinSize(SELECT_MACHINE_DIALOG_BUTTON_SIZE);
m_button_refresh->SetCornerRadius(FromDIP(12));
@ -3350,11 +3417,11 @@ void SelectMachineDialog::on_dpi_changed(const wxRect &suggested_rect)
m_button_ensure->SetCornerRadius(FromDIP(12));
m_status_bar->msw_rescale();
for (auto checkpire : m_checkbox_list) {
for (auto checkpire : m_checkbox_list) {
checkpire.second->Rescale();
}
for (auto material1 : m_materialList) {
for (auto material1 : m_materialList) {
material1.second->item->msw_rescale();
}
@ -3435,7 +3502,7 @@ void SelectMachineDialog::set_default()
filename = m_plater->get_export_gcode_filename("", true);
if (filename.empty()) filename = _L("Untitled");
}
fs::path filename_path(filename.c_str());
m_current_project_name = wxString::FromUTF8(filename_path.filename().string());
@ -3531,7 +3598,7 @@ void SelectMachineDialog::set_default_normal()
std::vector<std::string> materials;
std::vector<std::string> brands;
std::vector<std::string> display_materials;
auto preset_bundle = wxGetApp().preset_bundle;
for (auto filament_name : preset_bundle->filament_presets) {
for (auto iter = preset_bundle->filaments.lbegin(); iter != preset_bundle->filaments.end(); iter++) {
@ -3549,7 +3616,7 @@ void SelectMachineDialog::set_default_normal()
}
}
//init MaterialItem
//init MaterialItem
auto extruders = wxGetApp().plater()->get_partplate_list().get_curr_plate()->get_used_extruders();
BitmapCache bmcache;
@ -3716,8 +3783,8 @@ void SelectMachineDialog::set_default_from_sdcard()
materials.push_back(fo.type);
brands.push_back(fo.brand);
}
//init MaterialItem
//init MaterialItem
MaterialHash::iterator iter = m_materialList.begin();
while (iter != m_materialList.end()) {
int id = iter->first;
@ -3732,7 +3799,7 @@ void SelectMachineDialog::set_default_from_sdcard()
m_materialList.clear();
m_filaments.clear();
for (auto i = 0; i < m_required_data_plate_data_list[m_print_plate_idx]->slice_filaments_info.size(); i++) {
FilamentInfo fo = m_required_data_plate_data_list[m_print_plate_idx]->slice_filaments_info[i];
@ -3900,7 +3967,7 @@ bool SelectMachineDialog::Show(bool show)
if (obj_->is_connected()) {
obj_->disconnect();
}
}
}
}