From 4cfd8e896b5ee458eb5f6bb1e3a853c3a561be05 Mon Sep 17 00:00:00 2001 From: YuSanka Date: Fri, 31 Jan 2025 15:52:54 +0100 Subject: [PATCH] Follow-up 4be7eeabb4: Fixed a typo caused disable to start GcodeViewer as a separate application SPE-2670 --- src/CLI/GuiParams.cpp | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/src/CLI/GuiParams.cpp b/src/CLI/GuiParams.cpp index ed70aa4018..f44b91651f 100644 --- a/src/CLI/GuiParams.cpp +++ b/src/CLI/GuiParams.cpp @@ -22,26 +22,20 @@ bool init_gui_params(GUI::GUI_InitParams& gui_params, int argc, char** argv, Dat start_gui = true; gui_params.opengl_aa = true; } -#if SLIC3R_OPENGL_ES - // are we starting as gcodeviewer ? - if (cli.misc_config.has("gcodeviewer")) { - cli.start_gui = true; - cli.start_as_gcodeviewer = true; - } -#else - // search for special keys into command line parameters - if (cli.misc_config.has("gcodeviewer")) { + // are we starting as gcodeviewer ? + if (cli.actions_config.has("gcodeviewer")) { start_gui = true; gui_params.start_as_gcodeviewer = true; } - else { #ifndef _WIN32 + else { // On Unix systems, the prusa-slicer binary may be symlinked to give the application a different meaning. gui_params.start_as_gcodeviewer = boost::algorithm::iends_with(boost::filesystem::path(argv[0]).filename().string(), "gcodeviewer"); -#endif // _WIN32 } +#endif // _WIN32 +#if !SLIC3R_OPENGL_ES if (cli.misc_config.has("opengl-version")) { const Semver opengl_minimum = Semver(3, 2, 0); const std::string opengl_version_str = cli.misc_config.opt_string("opengl-version");