Skip to content

Commit

Permalink
do not set project filename on object import (#7973)
Browse files Browse the repository at this point in the history
  • Loading branch information
buzzhuzz authored Jan 8, 2025
1 parent 7f391bc commit e315586
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/slic3r/GUI/Plater.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9387,7 +9387,8 @@ void Plater::add_model(bool imperial_units, std::string fname)
if (!load_files(paths, strategy, ask_multi).empty()) {

if (get_project_name() == _L("Untitled") && paths.size() > 0) {
p->set_project_filename(wxString::FromUTF8(paths[0].string()));
boost::filesystem::path full_path(paths[0].string());
p->set_project_name(from_u8(full_path.stem().string()));
}

wxGetApp().mainframe->update_title();
Expand Down Expand Up @@ -10997,8 +10998,8 @@ void Plater::add_file()
Plater::TakeSnapshot snapshot(this, snapshot_label);
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()));

boost::filesystem::path full_path(paths[0].string());
p->set_project_name(from_u8(full_path.stem().string()));
}
wxGetApp().mainframe->update_title();
}
Expand All @@ -11018,7 +11019,8 @@ void Plater::add_file()
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()));
boost::filesystem::path full_path(paths[0].string());
p->set_project_name(from_u8(full_path.stem().string()));
}
wxGetApp().mainframe->update_title();
}
Expand Down

0 comments on commit e315586

Please sign in to comment.