Fix for #6803 - Illegal character in filename when STL opened direct from CAD app

Follow-up to ea4e9b35a3
Win32 specific: Substitute slashes to back slashes in file paths
when loading model files (STLs, 3MFS ...)
This commit is contained in:
Vojtech Bubnik 2021-09-01 11:08:08 +02:00
parent b0c4a13ebd
commit ab84da6c56
2 changed files with 16 additions and 23 deletions

View file

@ -1702,8 +1702,7 @@ void ObjectList::load_shape_object_from_gallery(const wxArrayString& input_files
snapshot_label += ", " + wxString::FromUTF8(paths[i].filename().string().c_str());
take_snapshot(snapshot_label);
std::vector<size_t> res = wxGetApp().plater()->load_files(paths, true, false);
if (!res.empty())
if (! wxGetApp().plater()->load_files(paths, true, false).empty())
wxGetApp().mainframe->update_title();
}