FIX:[STUDIO-4108] rename when load STL/STEP

JIRA: STUDIO-4108
github: #2325

Change-Id: Ibec16c822c0e8aeb1c064633225c7f500eb6990d
This commit is contained in:
Kunlong Ma 2023-08-30 09:50:59 +08:00 committed by Lane.Wei
parent 0e8b85842a
commit debbed13d6
2 changed files with 11 additions and 3 deletions

View File

@ -637,7 +637,7 @@ DPIFrame(NULL, wxID_ANY, "", wxDefaultPosition, wxDefaultSize, BORDERLESS_FRAME_
if (evt.CmdDown() && evt.GetKeyCode() == 'I') {
if (!can_add_models()) return;
if (m_plater) { m_plater->add_model(); }
if (m_plater) { m_plater->add_file(); }
return;
}
evt.Skip();

View File

@ -9685,7 +9685,12 @@ void Plater::add_file()
case LoadFilesType::SingleOther: {
Plater::TakeSnapshot snapshot(this, snapshot_label);
if (!load_files(paths, LoadStrategy::LoadModel, false).empty()) { wxGetApp().mainframe->update_title(); }
if (!load_files(paths, LoadStrategy::LoadModel, false).empty()) {
if (get_project_name() == _L("Untitled") && paths.size() > 0) {
p->set_project_filename(wxString::FromUTF8(paths[0].string()));
}
wxGetApp().mainframe->update_title();
}
break;
}
case LoadFilesType::Multiple3MF:
@ -9701,6 +9706,9 @@ void Plater::add_file()
case LoadFilesType::MultipleOther: {
Plater::TakeSnapshot snapshot(this, snapshot_label);
if (!load_files(paths, LoadStrategy::LoadModel, true).empty()) {
if (get_project_name() == _L("Untitled") && paths.size() > 0) {
p->set_project_filename(wxString::FromUTF8(paths[0].string()));
}
wxGetApp().mainframe->update_title();
}
break;