Trying to redefine GUI_App::MacOpenFiles to get events from the Finder

This commit is contained in:
bubnikv 2019-01-09 15:40:12 +01:00
parent a476e4ca0f
commit c258375fe2
2 changed files with 16 additions and 0 deletions

View File

@ -742,6 +742,17 @@ void GUI_App::load_current_presets()
}
}
#ifdef __APPLE__
// wxWidgets override to get an event on open files.
void GUI_App::MacOpenFiles(const wxArrayString &fileNames)
{
std::vector<std::string> files;
for (size_t i = 0; i < fileNames.Len(); ++ i)
files.emplace_back(fileNames[i].ToUTF8().data());
this->plater()->load_files(files, true, true);
}
#endif /* __APPLE */
Sidebar& GUI_App::sidebar()
{
return plater_->sidebar();

View File

@ -144,6 +144,11 @@ public:
void delete_tab_from_list(Tab* tab);
void load_current_presets();
#ifdef __APPLE__
// wxWidgets override to get an event on open files.
void MacOpenFiles(const wxArrayString &fileNames) override;
#endif /* __APPLE */
Sidebar& sidebar();
ObjectManipulation* obj_manipul();
ObjectSettings* obj_settings();