From a4dbe04ff0d7ad673a8a46042ca8c9e1128073dd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Ba=C5=99tip=C3=A1n?= Date: Mon, 29 Jul 2024 10:51:28 +0200 Subject: [PATCH] PrinterWebViewPanel: clearing API key when setting username/pwd credentials and vice versa to keep consistent state passed to webview authentication delegate --- src/slic3r/GUI/WebViewDialog.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/slic3r/GUI/WebViewDialog.hpp b/src/slic3r/GUI/WebViewDialog.hpp index 90ae1c8ccc..313413c48b 100644 --- a/src/slic3r/GUI/WebViewDialog.hpp +++ b/src/slic3r/GUI/WebViewDialog.hpp @@ -224,8 +224,8 @@ public: void send_api_key(); void send_credentials(); - void set_api_key(const std::string& key) { m_api_key = key; } - void set_credentials(const std::string& usr, const std::string& psk) { m_usr = usr; m_psk = psk; } + void set_api_key(const std::string& key) { m_api_key = key; m_usr.clear(); m_psk.clear(); } + void set_credentials(const std::string& usr, const std::string& psk) { m_usr = usr; m_psk = psk; m_api_key.clear(); } void clear() { m_api_key.clear(); m_usr.clear(); m_psk.clear(); m_api_key_sent = false; } void sys_color_changed() override; private: