mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-26 16:13:58 -06:00
FIX:fixed send button refresh too many times
Change-Id: Ifb0b9e4d2e6ed7997ba7f033d555ea3aeec9fa9c
This commit is contained in:
parent
ae7a9303b8
commit
297e4d1373
2 changed files with 14 additions and 11 deletions
|
@ -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,8 +1696,10 @@ 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) {
|
||||
m_simplebook->SetSelection(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()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue