mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-09-09 18:27:00 +00:00
fix: guard Bambu Lab dev-mode dialog against repeat spam (#14774)
This commit is contained in:
@@ -558,6 +558,7 @@ namespace Slic3r
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
Slic3r::GUI::wxGetApp().reset_unsigned_plugin_warning();
|
||||||
if (m_agent)
|
if (m_agent)
|
||||||
{
|
{
|
||||||
if (it->second->connection_type() != "lan" || it->second->connection_type().empty())
|
if (it->second->connection_type() != "lan" || it->second->connection_type().empty())
|
||||||
|
|||||||
@@ -6127,18 +6127,23 @@ bool GUI_App::process_network_msg(std::string dev_id, std::string msg)
|
|||||||
}
|
}
|
||||||
else if (msg == "unsigned_studio") {
|
else if (msg == "unsigned_studio") {
|
||||||
BOOST_LOG_TRIVIAL(info) << "process_network_msg, unsigned_studio";
|
BOOST_LOG_TRIVIAL(info) << "process_network_msg, unsigned_studio";
|
||||||
MessageDialog
|
// Plugin re-emits this on every subscribe retry; latch it so it shows
|
||||||
msg_dlg(nullptr,
|
// once per connection episode.
|
||||||
_L("To use OrcaSlicer with Bambu Lab printers, you need to enable LAN mode and Developer mode on your printer.\n\n"
|
if (!m_show_error_msgdlg && !m_unsigned_plugin_warning_shown) {
|
||||||
"Please go to your printer's settings and:\n"
|
m_unsigned_plugin_warning_shown = true;
|
||||||
"1. Turn on LAN mode\n"
|
MessageDialog
|
||||||
"2. Enable Developer mode\n\n"
|
msg_dlg(nullptr,
|
||||||
"Developer mode allows the printer to work exclusively through local network access, "
|
_L("To use OrcaSlicer with Bambu Lab printers, you need to enable LAN mode and Developer mode on your printer.\n\n"
|
||||||
"enabling full functionality with OrcaSlicer."),
|
"Please go to your printer's settings and:\n"
|
||||||
_L("Network Plug-in Restriction"), wxAPPLY | wxOK);
|
"1. Turn on LAN mode\n"
|
||||||
m_show_error_msgdlg = true;
|
"2. Enable Developer mode\n\n"
|
||||||
msg_dlg.ShowModal();
|
"Developer mode allows the printer to work exclusively through local network access, "
|
||||||
m_show_error_msgdlg = false;
|
"enabling full functionality with OrcaSlicer."),
|
||||||
|
_L("Network Plug-in Restriction"), wxAPPLY | wxOK);
|
||||||
|
m_show_error_msgdlg = true;
|
||||||
|
msg_dlg.ShowModal();
|
||||||
|
m_show_error_msgdlg = false;
|
||||||
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -343,6 +343,7 @@ private:
|
|||||||
public:
|
public:
|
||||||
//try again when subscription fails
|
//try again when subscription fails
|
||||||
void on_start_subscribe_again(std::string dev_id);
|
void on_start_subscribe_again(std::string dev_id);
|
||||||
|
void reset_unsigned_plugin_warning() { m_unsigned_plugin_warning_shown = false; }
|
||||||
std::string get_local_models_path();
|
std::string get_local_models_path();
|
||||||
bool OnInit() override;
|
bool OnInit() override;
|
||||||
int OnExit() override;
|
int OnExit() override;
|
||||||
|
|||||||
Reference in New Issue
Block a user