mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-08 23:46:24 -06:00
ENH: improve the send all logic
if has one plate with valid gcode, let the send_all success https://jira.bambooolab.com/browse/STUDIO-2355 Change-Id: I9f022604e354560fea67d2914294391194e5234f
This commit is contained in:
parent
9e077b2e65
commit
82d10c34e0
1 changed files with 20 additions and 3 deletions
|
@ -162,9 +162,26 @@ void SendJob::process()
|
|||
|
||||
PartPlate* plate = m_plater->get_partplate_list().get_plate(job_data.plate_idx);
|
||||
if (plate == nullptr) {
|
||||
plate = m_plater->get_partplate_list().get_curr_plate();
|
||||
if (plate == nullptr)
|
||||
return;
|
||||
if (job_data.plate_idx == PLATE_ALL_IDX) {
|
||||
//all plate
|
||||
for (int index = 0; index < total_plate_num; index++)
|
||||
{
|
||||
PartPlate* plate_n = m_plater->get_partplate_list().get_plate(index);
|
||||
if (plate_n && plate_n->is_valid_gcode_file())
|
||||
{
|
||||
plate = plate_n;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
plate = m_plater->get_partplate_list().get_curr_plate();
|
||||
}
|
||||
if (plate == nullptr) {
|
||||
BOOST_LOG_TRIVIAL(error) << "can not find plate with valid gcode file when sending to print, plate_index="<< job_data.plate_idx;
|
||||
update_status(curr_percent, check_gcode_failed_str);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
/* check gcode is valid */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue