mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2026-02-13 03:59:29 -07:00
FIX: disable filament editing if printing
jira: [STUDIO-12153] Change-Id: I2397360439d5baaf673c9fc306f3b08eb068cfec (cherry picked from commit 8308fe3964f72cd911ac472923e8b27b0b3f9c61)
This commit is contained in:
parent
787689a258
commit
a650db2903
2 changed files with 13 additions and 10 deletions
|
|
@ -414,21 +414,23 @@ void AMSMaterialsSetting::update()
|
|||
{
|
||||
if (obj) {
|
||||
update_widgets();
|
||||
if (obj->is_in_printing() || obj->can_resume()) {
|
||||
enable_confirm_button(false);
|
||||
} else {
|
||||
enable_confirm_button(true);
|
||||
}
|
||||
update_filament_editing(obj->is_in_printing() || obj->can_resume());
|
||||
}
|
||||
}
|
||||
|
||||
void AMSMaterialsSetting::enable_confirm_button(bool en)
|
||||
void AMSMaterialsSetting::update_filament_editing(bool is_printing)
|
||||
{
|
||||
if (!en) {
|
||||
if (is_printing) {
|
||||
m_comboBox_filament->Enable(obj->is_support_filament_setting_inprinting);
|
||||
m_comboBox_cali_result->Enable(obj->is_support_filament_setting_inprinting);
|
||||
m_button_confirm->Show(obj->is_support_filament_setting_inprinting);
|
||||
m_button_reset->Show(obj->is_support_filament_setting_inprinting);
|
||||
}
|
||||
else {
|
||||
m_button_confirm->Show(en);
|
||||
m_comboBox_filament->Enable(true);
|
||||
m_comboBox_cali_result->Enable(true);
|
||||
m_button_reset->Show(true);
|
||||
m_button_confirm->Show(true);
|
||||
}
|
||||
|
||||
if (!m_is_third) {
|
||||
|
|
@ -447,7 +449,7 @@ void AMSMaterialsSetting::enable_confirm_button(bool en)
|
|||
}
|
||||
|
||||
m_tip_readonly->Wrap(FromDIP(380));
|
||||
m_tip_readonly->Show(!en);
|
||||
m_tip_readonly->Show(is_printing);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -103,7 +103,6 @@ public:
|
|||
void input_min_finish();
|
||||
void input_max_finish();
|
||||
void update();
|
||||
void enable_confirm_button(bool en);
|
||||
bool Show(bool show) override;
|
||||
void Popup(wxString filament = wxEmptyString, wxString sn = wxEmptyString,
|
||||
wxString temp_min = wxEmptyString, wxString temp_max = wxEmptyString,
|
||||
|
|
@ -147,6 +146,8 @@ protected:
|
|||
bool is_virtual_tray();
|
||||
void update_widgets();
|
||||
|
||||
void update_filament_editing(bool is_printing);
|
||||
|
||||
protected:
|
||||
StateColor m_btn_bg_green;
|
||||
StateColor m_btn_bg_gray;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue