Merge remote-tracking branch 'upstream/master' into Update_translation_pt_br_v2.3
This commit is contained in:
commit
bc33cc104a
@ -1496,6 +1496,7 @@ bool PlaterDropTarget::OnDropFiles(wxCoord x, wxCoord y, const wxArrayString &fi
|
|||||||
// Likely all paths processed were gcodes, for which a G-code viewer instance has hopefully been started.
|
// Likely all paths processed were gcodes, for which a G-code viewer instance has hopefully been started.
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
// searches for project files
|
||||||
for (std::vector<fs::path>::const_reverse_iterator it = paths.rbegin(); it != paths.rend(); ++it) {
|
for (std::vector<fs::path>::const_reverse_iterator it = paths.rbegin(); it != paths.rend(); ++it) {
|
||||||
std::string filename = (*it).filename().string();
|
std::string filename = (*it).filename().string();
|
||||||
if (boost::algorithm::iends_with(filename, ".3mf") || boost::algorithm::iends_with(filename, ".amf")) {
|
if (boost::algorithm::iends_with(filename, ".3mf") || boost::algorithm::iends_with(filename, ".amf")) {
|
||||||
@ -1538,10 +1539,31 @@ bool PlaterDropTarget::OnDropFiles(wxCoord x, wxCoord y, const wxArrayString &fi
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// other files
|
||||||
|
wxString snapshot_label;
|
||||||
|
assert(!paths.empty());
|
||||||
|
if (paths.size() == 1) {
|
||||||
|
snapshot_label = _L("Load File");
|
||||||
|
snapshot_label += ": ";
|
||||||
|
snapshot_label += wxString::FromUTF8(paths.front().filename().string().c_str());
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
snapshot_label = _L("Load Files");
|
||||||
|
snapshot_label += ": ";
|
||||||
|
snapshot_label += wxString::FromUTF8(paths.front().filename().string().c_str());
|
||||||
|
for (size_t i = 1; i < paths.size(); ++i) {
|
||||||
|
snapshot_label += ", ";
|
||||||
|
snapshot_label += wxString::FromUTF8(paths[i].filename().string().c_str());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Plater::TakeSnapshot snapshot(plater, snapshot_label);
|
||||||
|
plater->load_files(paths);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user