ENH: display unload filament button when use_ams is false

Change-Id: I4dc7cc17c33e5f92543934c3d003c34fea94b0cb
Signed-off-by: Stone Li <stone.li@bambulab.com>
This commit is contained in:
Stone Li 2022-12-09 15:38:54 +08:00 committed by Lane.Wei
parent 761bf07c44
commit a9938d7676
3 changed files with 19 additions and 7 deletions

View file

@ -1633,17 +1633,16 @@ void StatusPanel::update_misc_ctrl(MachineObject *obj)
{
if (!obj) return;
if (obj->has_ams()) {
if (obj->can_unload_filament()) {
if (!m_button_unload->IsShown()) {
m_button_unload->Show();
m_button_unload->GetParent()->Layout();
}
} else {
if (m_button_unload->IsShown()) {
m_button_unload->Hide();
m_button_unload->GetParent()->Layout();
}
} else {
if (!m_button_unload->IsShown()) {
m_button_unload->Show();
m_button_unload->GetParent()->Layout();
}
}
// update extruder icon