ENH: mark icon if plate bed_type differ from global

Change-Id: I6ae1396b8a3007b61ce85992ebb2aec6c64ec2ff
(cherry picked from commit c8dbb583838df20105c0ca4f9d1a5d711d7c0347)
This commit is contained in:
tao.jin 2022-11-09 21:40:29 +08:00 committed by Lane.Wei
parent f01cf37ead
commit 0dd5057b4d
10 changed files with 207 additions and 344 deletions

View file

@ -5212,6 +5212,10 @@ void Plater::priv::on_select_bed_type(wxCommandEvent &evt)
app_config->set("curr_bed_type", std::to_string(int(bed_type)));
// update render
auto plate_list = partplate_list.get_plate_list();
for (auto plate : plate_list) {
plate->set_plate_render_option(false);
}
view3D->get_canvas3d()->render();
preview->msw_rescale();
}
@ -10588,6 +10592,7 @@ int Plater::select_plate_by_hover_id(int hover_id, bool right_click)
bool same_as_global = false;
auto type = (BedType)(e.GetInt());
p->partplate_list.get_curr_plate()->set_bed_type(type, same_as_global);
p->partplate_list.get_curr_plate()->set_plate_render_option(same_as_global?false:true);
BOOST_LOG_TRIVIAL(info) << __FUNCTION__ << boost::format("select bed type %1% for plate %2% at plate side")%type %plate_index;
});
dlg.ShowModal();