Merge branch 'master' of https://github.com/prusa3d/PrusaSlicer into et_gcode_viewer

This commit is contained in:
enricoturri1966 2020-04-29 12:53:55 +02:00
commit 05e4476808
76 changed files with 16873 additions and 901 deletions

View file

@ -51,13 +51,14 @@
#include "slic3r/GUI/GUI.hpp"
#include "slic3r/GUI/GUI_App.hpp"
#include "slic3r/GUI/3DScene.hpp"
#include "slic3r/GUI/InstanceCheck.hpp"
#include "slic3r/GUI/AppConfig.hpp"
#endif /* SLIC3R_GUI */
using namespace Slic3r;
int CLI::run(int argc, char **argv)
{
#ifdef __WXGTK__
// On Linux, wxGTK has no support for Wayland, and the app crashes on
// startup if gtk3 is used. This env var has to be set explicitly to
@ -528,6 +529,16 @@ int CLI::run(int argc, char **argv)
#ifdef SLIC3R_GUI
// #ifdef USE_WX
GUI::GUI_App *gui = new GUI::GUI_App();
bool gui_single_instance_setting = gui->app_config->get("single_instance") == "1";
if (Slic3r::instance_check(argc, argv, gui_single_instance_setting)) {
//TODO: do we have delete gui and other stuff?
return -1;
}
//gui->app_config = app_config;
//app_config = nullptr;
// gui->autosave = m_config.opt_string("autosave");
GUI::GUI_App::SetInstance(gui);
gui->CallAfter([gui, this, &load_configs] {