FIX: modify plate print sequence, the wipe tower is not update

STUDIO-2279 STUDIO-2280

Change-Id: I9a65ae4c02afc48666131b37d0282d59aa25c560
This commit is contained in:
zhimin.zeng 2023-03-10 18:14:17 +08:00 committed by Lane.Wei
parent ad43a54e3d
commit c098e01b22
2 changed files with 7 additions and 2 deletions

View File

@ -2556,8 +2556,12 @@ void GLCanvas3D::reload_scene(bool refresh_immediately, bool force_full_scene_re
if (wt && (timelapse_enabled || filaments_count > 1)) {
for (int plate_id = 0; plate_id < n_plates; plate_id++) {
// If print ByObject and there is only one object in the plate, the wipe tower is allowed to be generated.
if (co != nullptr && co->value == PrintSequence::ByObject && ppl.get_plate(plate_id)->printable_instance_size() != 1)
continue;
PartPlate* part_plate = ppl.get_plate(plate_id);
if (part_plate->get_print_seq() == PrintSequence::ByObject ||
(part_plate->get_print_seq() == PrintSequence::ByDefault && co != nullptr && co->value == PrintSequence::ByObject)) {
if (ppl.get_plate(plate_id)->printable_instance_size() != 1)
continue;
}
DynamicPrintConfig& proj_cfg = wxGetApp().preset_bundle->project_config;
float x = dynamic_cast<const ConfigOptionFloats*>(proj_cfg.option("wipe_tower_x"))->get_at(plate_id);

View File

@ -11205,6 +11205,7 @@ int Plater::select_plate_by_hover_id(int hover_id, bool right_click)
BOOST_LOG_TRIVIAL(info) << __FUNCTION__ << boost::format("select print sequence %1% for plate %2% at plate side")%ps_sel %plate_index;
auto plate_config = *(curr_plate->config());
wxGetApp().plater()->config_change_notification(plate_config, std::string("print_sequence"));
update();
});
dlg.ShowModal();