From 297e4d137350245d118894797c3326ba9a23e2c8 Mon Sep 17 00:00:00 2001 From: tao wang Date: Mon, 21 Aug 2023 17:33:18 +0800 Subject: [PATCH] FIX:fixed send button refresh too many times Change-Id: Ifb0b9e4d2e6ed7997ba7f033d555ea3aeec9fa9c --- src/slic3r/GUI/SelectMachine.cpp | 23 +++++++++++++---------- src/slic3r/GUI/SelectMachine.hpp | 2 +- 2 files changed, 14 insertions(+), 11 deletions(-) diff --git a/src/slic3r/GUI/SelectMachine.cpp b/src/slic3r/GUI/SelectMachine.cpp index 23f4e0357..000b87837 100644 --- a/src/slic3r/GUI/SelectMachine.cpp +++ b/src/slic3r/GUI/SelectMachine.cpp @@ -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::vectorEnable(); - // 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& result);