FIX:fixed invalid click of the back button in 3party printer dialog

Change-Id: I09f2aef83f802697ef581465eeda9b2239c806bf
This commit is contained in:
tao wang 2023-05-25 20:45:32 +08:00 committed by Lane.Wei
parent 2d43ce4702
commit 713e346a11

View file

@ -2735,6 +2735,16 @@ ConfigWizard::ConfigWizard(wxWindow *parent)
p->init_dialog_size();
});
p->btn_prev->Bind(wxEVT_BUTTON, [this](const wxCommandEvent&)
{
ConfigWizardPage* active_page = this->p->index->active_page();
if ((active_page == p->page_filaments || active_page == p->page_sla_materials) &&
!p->check_and_install_missing_materials(dynamic_cast<PageMaterials*>(active_page)->materials->technology))
// In that case don't leave the page and the function above queried the user whether to install default materials.
return;
this->p->index->go_prev();
});
p->btn_next->Bind(wxEVT_BUTTON, [this](const wxCommandEvent &)
{
ConfigWizardPage* active_page = this->p->index->active_page();