mirror of
https://git.mirrors.martin98.com/https://github.com/prusa3d/PrusaSlicer.git
synced 2025-08-12 02:29:04 +08:00
Remove script handler on EndModal.
This commit is contained in:
parent
9435515a8c
commit
98ec4e808d
@ -5877,9 +5877,13 @@ void Plater::connect_gcode()
|
||||
{
|
||||
assert(p->user_account->is_logged());
|
||||
std::string dialog_msg;
|
||||
if(PrinterPickWebViewDialog(this, dialog_msg).ShowModal() != wxID_OK) {
|
||||
{
|
||||
//PrinterPickWebViewDialog* dialog = new PrinterPickWebViewDialog(this, dialog_msg);
|
||||
PrinterPickWebViewDialog dialog(this, dialog_msg);
|
||||
if (dialog.ShowModal() != wxID_OK) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (dialog_msg.empty()) {
|
||||
show_error(this, _L("Failed to select a printer. PrusaConnect did not return a value."));
|
||||
return;
|
||||
|
@ -1063,6 +1063,7 @@ void PrinterPickWebViewDialog::on_script_message(wxWebViewEvent& evt)
|
||||
void PrinterPickWebViewDialog::on_request_update_selected_printer_action()
|
||||
{
|
||||
m_ret_val = m_message_data;
|
||||
m_browser->RemoveScriptMessageHandler("_prusaSlicer");
|
||||
this->EndModal(wxID_OK);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user