mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-18 02:52:10 +00:00
FIX: disable editing while sending print job
jira: [STUDIO-10362] Change-Id: Ie017db650699c64b751430a2bac2f9680626a750 (cherry picked from commit 79d626271cd1c7448e2cba5351b28d75652a710d)
This commit is contained in:
@@ -1066,6 +1066,7 @@ void SelectMachineDialog::sending_mode()
|
|||||||
// disable combobox
|
// disable combobox
|
||||||
m_comboBox_printer->Disable();
|
m_comboBox_printer->Disable();
|
||||||
Enable_Auto_Refill(false);
|
Enable_Auto_Refill(false);
|
||||||
|
EnableEditing(false);
|
||||||
|
|
||||||
m_is_in_sending_mode = true;
|
m_is_in_sending_mode = true;
|
||||||
if (m_simplebook->GetSelection() != 1){
|
if (m_simplebook->GetSelection() != 1){
|
||||||
@@ -1085,6 +1086,8 @@ void SelectMachineDialog::sending_mode()
|
|||||||
|
|
||||||
void SelectMachineDialog::finish_mode()
|
void SelectMachineDialog::finish_mode()
|
||||||
{
|
{
|
||||||
|
EnableEditing(true);
|
||||||
|
|
||||||
m_print_page_mode = PrintPageModeFinish;
|
m_print_page_mode = PrintPageModeFinish;
|
||||||
m_is_in_sending_mode = false;
|
m_is_in_sending_mode = false;
|
||||||
m_simplebook->SetSelection(2);
|
m_simplebook->SetSelection(2);
|
||||||
@@ -2306,6 +2309,29 @@ wxString SelectMachineDialog::format_steel_name(NozzleType type)
|
|||||||
return _L("Unknown");
|
return _L("Unknown");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void SelectMachineDialog::EnableEditing(bool enable)
|
||||||
|
{
|
||||||
|
/*project*/
|
||||||
|
m_rename_button->Enable(enable);
|
||||||
|
|
||||||
|
/*printer*/
|
||||||
|
m_comboBox_printer->Enable(enable);
|
||||||
|
m_button_refresh->Enable(enable);
|
||||||
|
|
||||||
|
/*mapping*/
|
||||||
|
m_filament_panel->Enable(enable);
|
||||||
|
m_filament_left_panel->Enable(enable);
|
||||||
|
m_filament_right_panel->Enable(enable);
|
||||||
|
|
||||||
|
/*mapping link*/
|
||||||
|
m_link_edit_nozzle->Enable(enable);
|
||||||
|
|
||||||
|
/*options*/
|
||||||
|
for (auto iter : m_checkbox_list)
|
||||||
|
{
|
||||||
|
iter.second->Enable(enable);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void SelectMachineDialog::Enable_Auto_Refill(bool enable)
|
void SelectMachineDialog::Enable_Auto_Refill(bool enable)
|
||||||
{
|
{
|
||||||
@@ -2652,6 +2678,8 @@ void SelectMachineDialog::on_set_finish_mapping(wxCommandEvent &evt)
|
|||||||
void SelectMachineDialog::on_print_job_cancel(wxCommandEvent &evt)
|
void SelectMachineDialog::on_print_job_cancel(wxCommandEvent &evt)
|
||||||
{
|
{
|
||||||
BOOST_LOG_TRIVIAL(info) << "print_job: canceled";
|
BOOST_LOG_TRIVIAL(info) << "print_job: canceled";
|
||||||
|
|
||||||
|
EnableEditing(true);
|
||||||
show_status(PrintDialogStatus::PrintStatusInit);
|
show_status(PrintDialogStatus::PrintStatusInit);
|
||||||
// enter prepare mode
|
// enter prepare mode
|
||||||
prepare_mode();
|
prepare_mode();
|
||||||
@@ -4409,6 +4437,7 @@ void SelectMachineDialog::sys_color_changed()
|
|||||||
bool SelectMachineDialog::Show(bool show)
|
bool SelectMachineDialog::Show(bool show)
|
||||||
{
|
{
|
||||||
if (show) {
|
if (show) {
|
||||||
|
EnableEditing(true);
|
||||||
m_options_other->Hide();
|
m_options_other->Hide();
|
||||||
m_advanced_options_icon->SetBitmap(create_scaled_bitmap("advanced_option1", this, 18));
|
m_advanced_options_icon->SetBitmap(create_scaled_bitmap("advanced_option1", this, 18));
|
||||||
m_refresh_timer->Start(LIST_REFRESH_INTERVAL);
|
m_refresh_timer->Start(LIST_REFRESH_INTERVAL);
|
||||||
|
|||||||
@@ -507,6 +507,9 @@ public:
|
|||||||
wxString format_bed_name(std::string plate_name);
|
wxString format_bed_name(std::string plate_name);
|
||||||
wxString format_steel_name(NozzleType type);
|
wxString format_steel_name(NozzleType type);
|
||||||
PrintDialogStatus get_status() { return m_print_status; }
|
PrintDialogStatus get_status() { return m_print_status; }
|
||||||
|
|
||||||
|
private:
|
||||||
|
void EnableEditing(bool enable);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user