FIX: [STUDIO-3016] fix not select model objects on load project

Change-Id: I4b686df9cd505f1c6c631aa3431201791c8d586d
This commit is contained in:
chunmao.guo 2023-06-12 10:44:16 +08:00 committed by Lane.Wei
parent ca0847d0ac
commit 5a7a2f7c42
2 changed files with 8 additions and 7 deletions

View file

@ -235,7 +235,7 @@ void MediaFilePanel::SetMachineObject(MachineObject* obj)
if (m_machine.empty()) {
m_image_grid->SetStatus(m_bmp_failed, _L("No printers."));
} else if (!m_supported) {
m_image_grid->SetStatus(m_bmp_failed, _L("Not supported by this model of printer!"));
m_image_grid->SetStatus(m_bmp_failed, _L("Initialize failed (Not supported on the current printer version)!"));
} else {
boost::shared_ptr<PrinterFileSystem> fs(new PrinterFileSystem);
fs->Attached();

View file

@ -3705,16 +3705,17 @@ std::vector<size_t> Plater::priv::load_files(const std::vector<fs::path>& input_
// XXX: Plater.pm had @loaded_files, but didn't seem to fill them with the filenames...
}
// automatic selection of added objects
if (!obj_idxs.empty() && view3D != nullptr && load_config) {
if (!obj_idxs.empty() && view3D != nullptr) {
// update printable state for new volumes on canvas3D
wxGetApp().plater()->canvas3D()->update_instance_printable_state_for_objects(obj_idxs);
Selection& selection = view3D->get_canvas3d()->get_selection();
selection.clear();
for (size_t idx : obj_idxs) {
selection.add_object((unsigned int)idx, false);
if (!load_config) {
Selection& selection = view3D->get_canvas3d()->get_selection();
selection.clear();
for (size_t idx : obj_idxs) {
selection.add_object((unsigned int)idx, false);
}
}
// BBS: update object list selection
this->sidebar->obj_list()->update_selections();