mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2026-02-22 20:42:34 -07:00
ENH:optimize the logic of the IP input window
jira:[STUDIO-10375 STUDIO-10534] Change-Id: I75ff12403dbf8f59fa95c938fa97ec2497f0ed67 (cherry picked from commit b62efed65f26b1ea4390c2d1e8681169e63fff99)
This commit is contained in:
parent
b561599575
commit
3a67f1bd27
9 changed files with 277 additions and 88 deletions
|
|
@ -9,6 +9,7 @@
|
|||
#include "MainFrame.hpp"
|
||||
#include "format.hpp"
|
||||
#include "Widgets/ProgressDialog.hpp"
|
||||
#include "ReleaseNote.hpp"
|
||||
#include "Widgets/RoundedRectangle.hpp"
|
||||
#include "Widgets/StaticBox.hpp"
|
||||
#include "ConnectPrinter.hpp"
|
||||
|
|
@ -905,10 +906,23 @@ void SendToPrinterDialog::on_ok(wxCommandEvent &event)
|
|||
|
||||
enable_prepare_mode = false;
|
||||
|
||||
m_send_job->on_check_ip_address_fail([this](int result) {
|
||||
wxCommandEvent *evt = new wxCommandEvent(EVT_CLEAR_IPADDRESS);
|
||||
wxQueueEvent(this, evt);
|
||||
wxGetApp().show_ip_address_enter_dialog();
|
||||
m_send_job->on_check_ip_address_fail([this, token = std::weak_ptr(m_token)](int result) {
|
||||
CallAfter([token, this] {
|
||||
if (token.expired()) { return; }
|
||||
if (this) {
|
||||
SendFailedConfirm sfcDlg;
|
||||
auto res = sfcDlg.ShowModal();
|
||||
m_status_bar->cancel();
|
||||
|
||||
if (res == wxYES) {
|
||||
wxQueueEvent(m_button_ensure, new wxCommandEvent(wxEVT_BUTTON));
|
||||
} else if (res == wxAPPLY) {
|
||||
wxCommandEvent *evt = new wxCommandEvent(EVT_CLEAR_IPADDRESS);
|
||||
wxQueueEvent(this, evt);
|
||||
wxGetApp().show_ip_address_enter_dialog();
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
if (obj_->is_lan_mode_printer()) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue