FIX: [STUDIO-2908] load files from command line
Change-Id: Icd67714f684bf150c568956e0685e67dca9e2ca8
This commit is contained in:
parent
d53bd3394a
commit
84eb6159aa
2 changed files with 7 additions and 13 deletions
|
@ -1048,19 +1048,12 @@ void GUI_App::post_init()
|
|||
else {
|
||||
mainframe->select_tab(size_t(MainFrame::tp3DEditor));
|
||||
plater_->select_view_3D("3D");
|
||||
Plater::TakeSnapshot snapshot(this->plater(), "Load Project", UndoRedo::SnapshotType::ProjectSeparator);
|
||||
const std::vector<size_t> res = this->plater()->load_files(this->init_params->input_files);
|
||||
if (!res.empty()) {
|
||||
if (this->init_params->input_files.size() == 1) {
|
||||
// Update application titlebar when opening a project file
|
||||
const std::string& filename = this->init_params->input_files.front();
|
||||
this->plater()->up_to_date(true, false);
|
||||
this->plater()->up_to_date(true, true);
|
||||
//BBS: remove amf logic as project
|
||||
if (boost::algorithm::iends_with(filename, ".3mf"))
|
||||
this->plater()->set_project_filename(from_u8(filename));
|
||||
}
|
||||
wxArrayString input_files;
|
||||
for (auto & file : this->init_params->input_files) {
|
||||
input_files.push_back(file);
|
||||
}
|
||||
this->plater()->set_project_filename(_L("Untitled"));
|
||||
this->plater()->load_files(input_files);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -7696,6 +7696,7 @@ int Plater::new_project(bool skip_confirm, bool silent)
|
|||
//get_partplate_list().update_slice_context_to_current_plate(p->background_process);
|
||||
//p->preview->update_gcode_result(p->partplate_list.get_current_slice_result());
|
||||
reset(transfer_preset_changes);
|
||||
reset_project_dirty_after_save();
|
||||
reset_project_dirty_initial_presets();
|
||||
wxGetApp().update_saved_preset_from_current_preset();
|
||||
update_project_dirty_from_presets();
|
||||
|
@ -7871,7 +7872,7 @@ int Plater::save_project(bool saveAs)
|
|||
up_to_date(true, true);
|
||||
|
||||
wxGetApp().update_saved_preset_from_current_preset();
|
||||
p->dirty_state.reset_after_save();
|
||||
reset_project_dirty_after_save();
|
||||
return wxID_YES;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue