call correct load_files at MacOpenFiles
This commit is contained in:
parent
ca09bf0805
commit
a650801b80
@ -1771,8 +1771,17 @@ void GUI_App::MacOpenFiles(const wxArrayString &fileNames)
|
||||
if (!non_gcode_files.empty())
|
||||
start_new_slicer(non_gcode_files, true);
|
||||
} else {
|
||||
if (! files.empty())
|
||||
if (! files.empty()) {
|
||||
#if ENABLE_DRAG_AND_DROP_FIX
|
||||
wxArrayString input_files;
|
||||
for (size_t i = 0; i < non_gcode_files.size(); ++i) {
|
||||
input_files.push_back(non_gcode_files[i]);
|
||||
}
|
||||
this->plater()->load_files(input_files);
|
||||
#else
|
||||
this->plater()->load_files(files, true, true);
|
||||
#endif
|
||||
}
|
||||
for (const wxString &filename : gcode_files)
|
||||
start_new_gcodeviewer(&filename);
|
||||
}
|
||||
|
@ -2132,7 +2132,7 @@ Plater::priv::priv(Plater *q, MainFrame *main_frame)
|
||||
|
||||
#if ENABLE_DRAG_AND_DROP_FIX
|
||||
this->q->Bind(EVT_LOAD_MODEL_OTHER_INSTANCE, [this](LoadFromOtherInstanceEvent& evt) {
|
||||
BOOST_LOG_TRIVIAL(debug) << "received load from other instance event ";
|
||||
BOOST_LOG_TRIVIAL(error) << "received load from other instance event (1)";
|
||||
wxArrayString input_files;
|
||||
for (size_t i = 0; i < evt.data.size(); ++i) {
|
||||
input_files.push_back(from_u8(evt.data[i].string()));
|
||||
@ -2142,7 +2142,7 @@ Plater::priv::priv(Plater *q, MainFrame *main_frame)
|
||||
});
|
||||
#else
|
||||
this->q->Bind(EVT_LOAD_MODEL_OTHER_INSTANCE, [this](LoadFromOtherInstanceEvent &evt) {
|
||||
BOOST_LOG_TRIVIAL(debug) << "received load from other instance event ";
|
||||
BOOST_LOG_TRIVIAL(error) << "received load from other instance event (2)";
|
||||
this->load_files(evt.data, true, true);
|
||||
});
|
||||
#endif // ENABLE_DRAG_AND_DROP_FIX
|
||||
|
Loading…
Reference in New Issue
Block a user