mirror of
https://git.mirrors.martin98.com/https://github.com/slic3r/Slic3r.git
synced 2025-08-15 19:35:57 +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;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//open file
|
||||||
Plater* plat = this->main_frame->plater();
|
Plater* plat = this->main_frame->plater();
|
||||||
Model& model = plat->model();
|
Model& model = plat->model();
|
||||||
if(cmb_add_replace->GetSelection() == 0)
|
if(cmb_add_replace->GetSelection() == 0)
|
||||||
plat->reset();
|
plat->reset();
|
||||||
std::vector<size_t> objs_idx = plat->load_files(std::vector<std::string>{ object_path.generic_string() }, true, false, false);
|
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;
|
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 ---
|
/// --- translate ---
|
||||||
const DynamicPrintConfig* printerConfig = this->gui_app->get_tab(Preset::TYPE_PRINTER)->get_config();
|
const DynamicPrintConfig* printerConfig = this->gui_app->get_tab(Preset::TYPE_PRINTER)->get_config();
|
||||||
const ConfigOptionPoints* bed_shape = printerConfig->option<ConfigOptionPoints>("bed_shape");
|
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();
|
ObjectList* obj = this->gui_app->obj_list();
|
||||||
obj->update_after_undo_redo();
|
obj->update_after_undo_redo();
|
||||||
|
|
||||||
|
if (objs_idx.size() > 1)
|
||||||
|
plat->arrange();
|
||||||
|
|
||||||
//plat->reslice();
|
//plat->reslice();
|
||||||
plat->select_view_3D("3D");
|
plat->select_view_3D("3D");
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace GUI
|
} // namespace GUI
|
||||||
|
Loading…
x
Reference in New Issue
Block a user