From fddd101685aac55398a801acf418aefc4a744538 Mon Sep 17 00:00:00 2001 From: tao wang Date: Mon, 3 Apr 2023 15:54:48 +0800 Subject: [PATCH] FIX:fixed the publish button will be hidden after switch languages Change-Id: I2f618d8440ebf7a00af6e7ad2bcda63746e04eef --- src/slic3r/GUI/GUI_App.cpp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/slic3r/GUI/GUI_App.cpp b/src/slic3r/GUI/GUI_App.cpp index 340e17bce..ae3aa46a8 100644 --- a/src/slic3r/GUI/GUI_App.cpp +++ b/src/slic3r/GUI/GUI_App.cpp @@ -3256,6 +3256,21 @@ void GUI_App::recreate_GUI(const wxString& msg_name) // config_wizard_startup(true); // }); + //show publish button + if (m_agent->is_user_login() && mainframe) { + int identifier; + int result = m_agent->get_user_info(&identifier); + auto publish_identifier = identifier & 1; + +#ifdef __WINDOWS__ + if (result == 0 && publish_identifier >= 0) { + mainframe->m_topbar->show_publish_button(publish_identifier == 0 ? false : true); + } +#else + mainframe->show_publish_button(publish_identifier == 0 ? false : true); +#endif + } + m_is_recreating_gui = false; BOOST_LOG_TRIVIAL(info) << __FUNCTION__ << "recreate_GUI exit";