mirror of
https://git.mirrors.martin98.com/https://github.com/bambulab/BambuStudio.git
synced 2025-08-05 22:26:30 +08:00
FIX: disable filament editing if printing
jira: [STUDIO-12153] Change-Id: I2397360439d5baaf673c9fc306f3b08eb068cfec
This commit is contained in:
parent
841514d309
commit
8308fe3964
@ -414,21 +414,23 @@ void AMSMaterialsSetting::update()
|
|||||||
{
|
{
|
||||||
if (obj) {
|
if (obj) {
|
||||||
update_widgets();
|
update_widgets();
|
||||||
if (obj->is_in_printing() || obj->can_resume()) {
|
update_filament_editing(obj->is_in_printing() || obj->can_resume());
|
||||||
enable_confirm_button(false);
|
|
||||||
} else {
|
|
||||||
enable_confirm_button(true);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
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_confirm->Show(obj->is_support_filament_setting_inprinting);
|
||||||
|
m_button_reset->Show(obj->is_support_filament_setting_inprinting);
|
||||||
}
|
}
|
||||||
else {
|
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) {
|
if (!m_is_third) {
|
||||||
@ -447,7 +449,7 @@ void AMSMaterialsSetting::enable_confirm_button(bool en)
|
|||||||
}
|
}
|
||||||
|
|
||||||
m_tip_readonly->Wrap(FromDIP(380));
|
m_tip_readonly->Wrap(FromDIP(380));
|
||||||
m_tip_readonly->Show(!en);
|
m_tip_readonly->Show(is_printing);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -102,7 +102,6 @@ public:
|
|||||||
void input_min_finish();
|
void input_min_finish();
|
||||||
void input_max_finish();
|
void input_max_finish();
|
||||||
void update();
|
void update();
|
||||||
void enable_confirm_button(bool en);
|
|
||||||
bool Show(bool show) override;
|
bool Show(bool show) override;
|
||||||
void Popup(wxString filament = wxEmptyString, wxString sn = wxEmptyString,
|
void Popup(wxString filament = wxEmptyString, wxString sn = wxEmptyString,
|
||||||
wxString temp_min = wxEmptyString, wxString temp_max = wxEmptyString,
|
wxString temp_min = wxEmptyString, wxString temp_max = wxEmptyString,
|
||||||
@ -146,6 +145,8 @@ protected:
|
|||||||
bool is_virtual_tray();
|
bool is_virtual_tray();
|
||||||
void update_widgets();
|
void update_widgets();
|
||||||
|
|
||||||
|
void update_filament_editing(bool is_printing);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
StateColor m_btn_bg_green;
|
StateColor m_btn_bg_green;
|
||||||
StateColor m_btn_bg_gray;
|
StateColor m_btn_bg_gray;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user