From 23aa139dbd0facab1d10443a15b0ddaedd544222 Mon Sep 17 00:00:00 2001 From: David Kocik Date: Wed, 1 Feb 2023 16:17:39 +0100 Subject: [PATCH] Fix of #9496 Downloader preferences options were creashing in Gcode Viewer. --- src/slic3r/GUI/Preferences.cpp | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/src/slic3r/GUI/Preferences.cpp b/src/slic3r/GUI/Preferences.cpp index 6727b7553..a7eb46753 100644 --- a/src/slic3r/GUI/Preferences.cpp +++ b/src/slic3r/GUI/Preferences.cpp @@ -708,15 +708,16 @@ void PreferencesDialog::update_ctrls_alignment() void PreferencesDialog::accept(wxEvent&) { - if (const auto it = m_values.find("downloader_url_registered"); it != m_values.end()) - downloader->allow(it->second == "1"); - if (!downloader->on_finish()) - return; - + if(wxGetApp().is_editor()) { + if (const auto it = m_values.find("downloader_url_registered"); it != m_values.end()) + downloader->allow(it->second == "1"); + if (!downloader->on_finish()) + return; #ifdef __linux__ - if( downloader->get_perform_registration_linux()) - DesktopIntegrationDialog::perform_desktop_integration(true); + if( downloader->get_perform_registration_linux()) + DesktopIntegrationDialog::perform_desktop_integration(true); #endif // __linux__ + } bool update_filament_sidebar = (m_values.find("no_templates") != m_values.end());