mirror of
https://git.mirrors.martin98.com/https://github.com/slic3r/Slic3r.git
synced 2025-08-15 11:56:04 +08:00
update to freecaddialog: don't save temp path, call arrange if >1
This commit is contained in:
parent
ec6a7a4576
commit
70edbbfca1
@ -1022,12 +1022,16 @@ void FreeCADDialog::create_geometry(wxCommandEvent& event_args) {
|
||||
return;
|
||||
}
|
||||
|
||||
//open file
|
||||
Plater* plat = this->main_frame->plater();
|
||||
Model& model = plat->model();
|
||||
if(cmb_add_replace->GetSelection() == 0)
|
||||
plat->reset();
|
||||
std::vector<size_t> objs_idx = plat->load_files(std::vector<std::string>{ object_path.generic_string() }, true, false, false);
|
||||
if (objs_idx.empty()) return;
|
||||
//don't save in the temp directory: erase the link to it
|
||||
for (int idx : objs_idx)
|
||||
model.objects[idx]->input_file = "";
|
||||
/// --- translate ---
|
||||
const DynamicPrintConfig* printerConfig = this->gui_app->get_tab(Preset::TYPE_PRINTER)->get_config();
|
||||
const ConfigOptionPoints* bed_shape = printerConfig->option<ConfigOptionPoints>("bed_shape");
|
||||
@ -1041,9 +1045,12 @@ void FreeCADDialog::create_geometry(wxCommandEvent& event_args) {
|
||||
ObjectList* obj = this->gui_app->obj_list();
|
||||
obj->update_after_undo_redo();
|
||||
|
||||
if (objs_idx.size() > 1)
|
||||
plat->arrange();
|
||||
|
||||
//plat->reslice();
|
||||
plat->select_view_3D("3D");
|
||||
|
||||
}
|
||||
|
||||
} // namespace GUI
|
||||
|
Loading…
x
Reference in New Issue
Block a user