FIX:fixed send button refresh too many times
Change-Id: Ifb0b9e4d2e6ed7997ba7f033d555ea3aeec9fa9c
This commit is contained in:
parent
ae7a9303b8
commit
297e4d1373
|
@ -1681,7 +1681,7 @@ void SelectMachineDialog::update_select_layout(MachineObject *obj)
|
|||
Fit();
|
||||
}
|
||||
|
||||
void SelectMachineDialog::prepare_mode()
|
||||
void SelectMachineDialog::prepare_mode(bool refresh_button)
|
||||
{
|
||||
// disable combobox
|
||||
m_comboBox_printer->Enable();
|
||||
|
@ -1696,7 +1696,9 @@ void SelectMachineDialog::prepare_mode()
|
|||
if (wxIsBusy())
|
||||
wxEndBusyCursor();
|
||||
|
||||
Enable_Send_Button(true);
|
||||
if (refresh_button) {
|
||||
Enable_Send_Button(true);
|
||||
}
|
||||
|
||||
m_status_bar->reset();
|
||||
if (m_simplebook->GetSelection() != 0) {
|
||||
|
@ -2014,13 +2016,6 @@ void SelectMachineDialog::show_status(PrintDialogStatus status, std::vector<wxSt
|
|||
else
|
||||
m_comboBox_printer->Enable();
|
||||
|
||||
// m_panel_warn m_simplebook
|
||||
if (status == PrintDialogStatus::PrintStatusSending) {
|
||||
sending_mode();
|
||||
} else {
|
||||
prepare_mode();
|
||||
}
|
||||
|
||||
// other
|
||||
if (status == PrintDialogStatus::PrintStatusInit) {
|
||||
update_print_status_msg(wxEmptyString, false, false);
|
||||
|
@ -2162,6 +2157,14 @@ void SelectMachineDialog::show_status(PrintDialogStatus status, std::vector<wxSt
|
|||
Enable_Send_Button(false);
|
||||
Enable_Refresh_Button(true);
|
||||
}
|
||||
|
||||
// m_panel_warn m_simplebook
|
||||
if (status == PrintDialogStatus::PrintStatusSending) {
|
||||
sending_mode();
|
||||
}
|
||||
else {
|
||||
prepare_mode(false);
|
||||
}
|
||||
}
|
||||
|
||||
void SelectMachineDialog::init_timer()
|
||||
|
|
|
@ -400,7 +400,7 @@ public:
|
|||
void check_fcous_state(wxWindow* window);
|
||||
void popup_filament_backup();
|
||||
void update_select_layout(MachineObject *obj);
|
||||
void prepare_mode();
|
||||
void prepare_mode(bool refresh_button = true);
|
||||
void sending_mode();
|
||||
void finish_mode();
|
||||
void sync_ams_mapping_result(std::vector<FilamentInfo>& result);
|
||||
|
|
Loading…
Reference in New Issue