From 785839685e618bf6c4fe763298425249e6111767 Mon Sep 17 00:00:00 2001 From: David Kocik Date: Mon, 5 Oct 2020 14:55:04 +0200 Subject: [PATCH] instance check: do not perform for gcode viewer --- src/PrusaSlicer.cpp | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/PrusaSlicer.cpp b/src/PrusaSlicer.cpp index 38379dc0d..f934470c1 100644 --- a/src/PrusaSlicer.cpp +++ b/src/PrusaSlicer.cpp @@ -580,12 +580,13 @@ int CLI::run(int argc, char **argv) GUI::GUI_App *gui = new GUI::GUI_App(); #endif // ENABLE_GCODE_VIEWER - 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; - } - + if(!start_as_gcodeviewer) { // gcode viewer is currently not performing instance check + 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->autosave = m_config.opt_string("autosave"); GUI::GUI_App::SetInstance(gui); #if ENABLE_GCODE_VIEWER