ENH:Leave the lifecycle of the window to wxwidget management
jira: none Change-Id: Ie059192eedd755524d8f010b73849bf2e70476cd
This commit is contained in:
parent
619be468ac
commit
fc476f115d
|
@ -3048,7 +3048,7 @@ void Sidebar::sync_ams_list(bool is_from_big_sync_btn)
|
||||||
temp_info.use_dialog_pos = false;
|
temp_info.use_dialog_pos = false;
|
||||||
temp_info.cancel_text_to_later = is_from_big_sync_btn;
|
temp_info.cancel_text_to_later = is_from_big_sync_btn;
|
||||||
if (m_sync_dlg == nullptr) {
|
if (m_sync_dlg == nullptr) {
|
||||||
m_sync_dlg = std::make_shared<SyncAmsInfoDialog>(this, temp_info);
|
m_sync_dlg = new SyncAmsInfoDialog(this, temp_info);
|
||||||
} else {
|
} else {
|
||||||
m_sync_dlg->set_info(temp_info);
|
m_sync_dlg->set_info(temp_info);
|
||||||
}
|
}
|
||||||
|
@ -3322,7 +3322,7 @@ void Sidebar::pop_sync_nozzle_and_ams_dialog() {
|
||||||
if (m_fna_dialog) { m_fna_dialog->on_hide(); }
|
if (m_fna_dialog) { m_fna_dialog->on_hide(); }
|
||||||
m_sna_dialog->update_info(temp_na_info);
|
m_sna_dialog->update_info(temp_na_info);
|
||||||
} else {
|
} else {
|
||||||
m_sna_dialog = std::make_shared<SyncNozzleAndAmsDialog>(temp_na_info);
|
m_sna_dialog = new SyncNozzleAndAmsDialog(temp_na_info);
|
||||||
}
|
}
|
||||||
m_sna_dialog->on_show();
|
m_sna_dialog->on_show();
|
||||||
});
|
});
|
||||||
|
@ -3344,7 +3344,7 @@ void Sidebar::pop_finsish_sync_ams_dialog()
|
||||||
if (m_sna_dialog) { m_sna_dialog->on_hide(); }
|
if (m_sna_dialog) { m_sna_dialog->on_hide(); }
|
||||||
m_fna_dialog->update_info(temp_fsa_info);
|
m_fna_dialog->update_info(temp_fsa_info);
|
||||||
} else {
|
} else {
|
||||||
m_fna_dialog = std::make_shared<FinishSyncAmsDialog>(temp_fsa_info);
|
m_fna_dialog = new FinishSyncAmsDialog(temp_fsa_info);
|
||||||
}
|
}
|
||||||
m_fna_dialog->on_show();
|
m_fna_dialog->on_show();
|
||||||
});
|
});
|
||||||
|
|
|
@ -122,13 +122,13 @@ class Sidebar : public wxPanel
|
||||||
Button * btn_sync{nullptr};
|
Button * btn_sync{nullptr};
|
||||||
ScalableButton * ams_btn{nullptr};
|
ScalableButton * ams_btn{nullptr};
|
||||||
bool m_last_slice_state = false;
|
bool m_last_slice_state = false;
|
||||||
std::shared_ptr<SyncNozzleAndAmsDialog> m_sna_dialog{nullptr};
|
SyncNozzleAndAmsDialog* m_sna_dialog{nullptr};
|
||||||
std::shared_ptr<FinishSyncAmsDialog> m_fna_dialog{nullptr};
|
FinishSyncAmsDialog* m_fna_dialog{nullptr};
|
||||||
std::vector<BedType> m_cur_combox_bed_types;
|
std::vector<BedType> m_cur_combox_bed_types;
|
||||||
std::string m_cur_image_bed_type;
|
std::string m_cur_image_bed_type;
|
||||||
int m_last_combo_bedtype_count{0};
|
int m_last_combo_bedtype_count{0};
|
||||||
bool m_begin_sync_printer_status{false};
|
bool m_begin_sync_printer_status{false};
|
||||||
std::shared_ptr<SyncAmsInfoDialog> m_sync_dlg{nullptr};
|
SyncAmsInfoDialog* m_sync_dlg{nullptr};
|
||||||
|
|
||||||
void update_sync_ams_btn_enable(wxUpdateUIEvent &e);
|
void update_sync_ams_btn_enable(wxUpdateUIEvent &e);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue