mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-17 02:22:17 +00:00
FIX: support retry when flow rate cali failed
Jira: [STUDIO-14271] Change-Id: I0aa52e97412f29de1630e19c13f57e93763f4c7c (cherry picked from commit 161daf87cf1e80a7c6f8f9bc6d07435bf8b0f9d1)
This commit is contained in:
@@ -17,6 +17,7 @@
|
|||||||
namespace Slic3r {
|
namespace Slic3r {
|
||||||
|
|
||||||
wxDEFINE_EVENT(EVT_SHOW_ERROR_INFO_SEND, wxCommandEvent);
|
wxDEFINE_EVENT(EVT_SHOW_ERROR_INFO_SEND, wxCommandEvent);
|
||||||
|
wxDEFINE_EVENT(EVT_SHOW_ERROR_FAIL_SEND, wxCommandEvent);
|
||||||
|
|
||||||
BBLStatusBarSend::BBLStatusBarSend(wxWindow *parent, int id)
|
BBLStatusBarSend::BBLStatusBarSend(wxWindow *parent, int id)
|
||||||
: m_self{new wxPanel(parent, id == -1 ? wxID_ANY : id)}
|
: m_self{new wxPanel(parent, id == -1 ? wxID_ANY : id)}
|
||||||
@@ -69,7 +70,7 @@ BBLStatusBarSend::BBLStatusBarSend(wxWindow *parent, int id)
|
|||||||
|
|
||||||
m_sizer_status_text = new wxBoxSizer(wxHORIZONTAL);
|
m_sizer_status_text = new wxBoxSizer(wxHORIZONTAL);
|
||||||
m_link_show_error = new Label(m_self, _L("Check the reason"));
|
m_link_show_error = new Label(m_self, _L("Check the reason"));
|
||||||
m_link_show_error->SetForegroundColour(wxColour(0x6b6b6b));
|
m_link_show_error->SetForegroundColour(wxColour("#6b6b6b"));
|
||||||
m_link_show_error->SetFont(::Label::Head_13);
|
m_link_show_error->SetFont(::Label::Head_13);
|
||||||
|
|
||||||
m_bitmap_show_error_close = create_scaled_bitmap("link_more_error_close", nullptr, 7);
|
m_bitmap_show_error_close = create_scaled_bitmap("link_more_error_close", nullptr, 7);
|
||||||
@@ -174,6 +175,9 @@ void BBLStatusBarSend::show_error_info(wxString msg, int code, wxString descript
|
|||||||
m_cancelbutton->Show();
|
m_cancelbutton->Show();
|
||||||
m_self->Layout();
|
m_self->Layout();
|
||||||
m_sizer->Layout();
|
m_sizer->Layout();
|
||||||
|
|
||||||
|
wxCommandEvent* evt = new wxCommandEvent(EVT_SHOW_ERROR_FAIL_SEND);
|
||||||
|
wxQueueEvent(this->m_self->GetParent(), evt);
|
||||||
}
|
}
|
||||||
|
|
||||||
void BBLStatusBarSend::show_progress(bool show)
|
void BBLStatusBarSend::show_progress(bool show)
|
||||||
|
|||||||
@@ -102,7 +102,7 @@ using Slic3r::BBLStatusBarSend;
|
|||||||
}
|
}
|
||||||
|
|
||||||
wxDECLARE_EVENT(EVT_SHOW_ERROR_INFO_SEND, wxCommandEvent);
|
wxDECLARE_EVENT(EVT_SHOW_ERROR_INFO_SEND, wxCommandEvent);
|
||||||
|
wxDECLARE_EVENT(EVT_SHOW_ERROR_FAIL_SEND, wxCommandEvent);
|
||||||
} // namespace Slic3r
|
} // namespace Slic3r
|
||||||
|
|
||||||
#endif // BBLSTATUSBAR_HPP
|
#endif // BBLSTATUSBAR_HPP
|
||||||
|
|||||||
@@ -1206,6 +1206,7 @@ void CalibrationPresetPage::create_page(wxWindow* parent)
|
|||||||
m_sending_panel->get_sending_progress_bar()->set_cancel_callback_fina([this]() {
|
m_sending_panel->get_sending_progress_bar()->set_cancel_callback_fina([this]() {
|
||||||
on_cali_cancel_job();
|
on_cali_cancel_job();
|
||||||
});
|
});
|
||||||
|
m_sending_panel->Bind(EVT_SHOW_ERROR_FAIL_SEND, [this](auto &event){on_cali_cancel_job();});
|
||||||
m_sending_panel->Hide();
|
m_sending_panel->Hide();
|
||||||
|
|
||||||
m_custom_range_panel = new CaliPresetCustomRangePanel(parent);
|
m_custom_range_panel = new CaliPresetCustomRangePanel(parent);
|
||||||
|
|||||||
Reference in New Issue
Block a user