ENH:After re-importing the multi-plate Gcode.3mf file, sending all plates to the printer results in information loss

jira: [STUDIO-11531]

Change-Id: Icfbf56ac1f6610f70c3ed192f765e3381ad8ddb6
(cherry picked from commit fcb4ca7a412dfc7c0897b96a3b4c528e6936c297)
This commit is contained in:
milk
2025-05-08 15:59:04 +08:00
committed by Noisyfox
parent 8065f11b60
commit 7c28b5ae52
4 changed files with 43 additions and 17 deletions

View File

@@ -5166,7 +5166,11 @@ std::vector<size_t> Plater::priv::load_files(const std::vector<fs::path>& input_
bool translate_old = false;
int current_width = 0, current_depth = 0, current_height = 0, project_filament_count = 1;
if (input_files.empty()) { return std::vector<size_t>(); }
if (input_files.empty())
return std::vector<size_t>();
if (!input_files.empty())
q->m_3mf_path = input_files[0].string();
// SoftFever: ugly fix so we can exist pa calib mode
background_process.fff_print()->calib_mode() = CalibMode::Calib_None;
@@ -14828,6 +14832,7 @@ int Plater::send_gcode(int plate_idx, Export3mfProgressFn proFn)
{
int result = 0;
/* generate 3mf */
if (plate_idx == PLATE_CURRENT_IDX) {
p->m_print_job_data.plate_idx = get_partplate_list().get_curr_plate_index();
}
@@ -14835,6 +14840,7 @@ int Plater::send_gcode(int plate_idx, Export3mfProgressFn proFn)
p->m_print_job_data.plate_idx = plate_idx;
}
PartPlate* plate = get_partplate_list().get_curr_plate();
try {
p->m_print_job_data._3mf_path = fs::path(plate->get_tmp_gcode_path());