From f1e70cb475f0971399522a6c37b584b6c28052a7 Mon Sep 17 00:00:00 2001 From: tao wang Date: Tue, 20 Feb 2024 15:24:51 +0800 Subject: [PATCH] NEW:enable loadl/unload when printing pause jira:[STUDIO-5968] Change-Id: Ieb3ef2423378e44b81a61a2b18c16f68aa335922 --- src/slic3r/GUI/StatusPanel.cpp | 44 +++++++++++++++++++++++++++++----- 1 file changed, 38 insertions(+), 6 deletions(-) diff --git a/src/slic3r/GUI/StatusPanel.cpp b/src/slic3r/GUI/StatusPanel.cpp index 289508484..61448e826 100644 --- a/src/slic3r/GUI/StatusPanel.cpp +++ b/src/slic3r/GUI/StatusPanel.cpp @@ -2758,13 +2758,45 @@ void StatusPanel::update_ams_control_state(bool is_curr_tray_selected) } if (obj->ams_exist_bits == 0) { - if (obj->is_in_printing() && !obj->can_resume()) { - enable[ACTION_BTN_LOAD] = false; - enable[ACTION_BTN_UNLOAD] = false; + if (obj->is_in_printing()) { + if (!obj->can_resume()) { + enable[ACTION_BTN_LOAD] = false; + enable[ACTION_BTN_UNLOAD] = false; + } + else{ + if (obj->m_tray_now == "255") { + enable[ACTION_BTN_LOAD] = true; + enable[ACTION_BTN_UNLOAD] = false; + } + else if (obj->m_tray_now == std::to_string(VIRTUAL_TRAY_ID)) { + enable[ACTION_BTN_LOAD] = false; + enable[ACTION_BTN_UNLOAD] = true; + } + } } - else { - enable[ACTION_BTN_LOAD] = true; - enable[ACTION_BTN_UNLOAD] = true; + + } + else { + if (obj->is_in_printing() /*&& obj->can_resume() && obj->m_tray_now != std::to_string(VIRTUAL_TRAY_ID) */) { + + if (!obj->can_resume()) { + enable[ACTION_BTN_LOAD] = false; + enable[ACTION_BTN_UNLOAD] = false; + } + else { + if (obj->m_tray_now == "255") { + enable[ACTION_BTN_LOAD] = true; + enable[ACTION_BTN_UNLOAD] = false; + } + else if (obj->m_tray_now == std::to_string(VIRTUAL_TRAY_ID)) { + enable[ACTION_BTN_LOAD] = false; + enable[ACTION_BTN_UNLOAD] = true; + } + else { + enable[ACTION_BTN_LOAD] = false; + enable[ACTION_BTN_UNLOAD] = false; + } + } } }