Skip to content

Commit

Permalink
FIX:[STUDIO-4108] rename when load STL/STEP
Browse files Browse the repository at this point in the history
JIRA: STUDIO-4108
github: #2325

Change-Id: Ibec16c822c0e8aeb1c064633225c7f500eb6990d
  • Loading branch information
MklBambu authored and lanewei120 committed Nov 1, 2023
1 parent 0e8b858 commit debbed1
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/slic3r/GUI/MainFrame.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
12 changes: 10 additions & 2 deletions src/slic3r/GUI/Plater.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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;
Expand All @@ -9719,7 +9727,7 @@ void Plater::add_file()

open_3mf_file(first_file[0]);
load_files(tmf_file, LoadStrategy::LoadModel);
if (!load_files(other_file, LoadStrategy::LoadModel, false).empty()) { wxGetApp().mainframe->update_title(); }
if (!load_files(other_file, LoadStrategy::LoadModel, false).empty()) { wxGetApp().mainframe->update_title();}
break;
default:break;
}
Expand Down

0 comments on commit debbed1

Please sign in to comment.