FIX: not open STL files with new window on Mac

Change-Id: Icecd60297197e5130801e32d4b0a6dfa714146a1
This commit is contained in:
chunmao.guo 2022-11-22 09:51:31 +08:00 committed by Lane.Wei
parent 6f4e80bbb6
commit 1400e9d63a

View file

@ -4905,10 +4905,16 @@ void GUI_App::OSXStoreOpenFiles(const wxArrayString &fileNames)
void GUI_App::MacOpenFiles(const wxArrayString &fileNames)
{
if (m_post_initialized) {
bool has3mf = false;
std::vector<wxString> names;
for (auto & n : fileNames) names.push_back(n);
start_new_slicer(names);
return;
for (auto & n : fileNames) {
has3mf |= n.EndsWith(".3mf");
names.push_back(n);
}
if (has3mf) {
start_new_slicer(names);
return;
}
}
std::vector<std::string> files;
std::vector<wxString> gcode_files;