diff --git a/src/slic3r/GUI/AMSMaterialsSetting.cpp b/src/slic3r/GUI/AMSMaterialsSetting.cpp index 34ff5fe0c..c40ea8400 100644 --- a/src/slic3r/GUI/AMSMaterialsSetting.cpp +++ b/src/slic3r/GUI/AMSMaterialsSetting.cpp @@ -254,8 +254,8 @@ void AMSMaterialsSetting::create_panel_normal(wxWindow* parent) m_tip_readonly = new Label(parent, _L("Setting AMS slot information while printing is not supported")); m_tip_readonly->SetForegroundColour(*wxBLACK); m_tip_readonly->SetBackgroundColour(*wxWHITE); - m_tip_readonly->SetMinSize(wxSize(FromDIP(450), -1)); - m_tip_readonly->SetMaxSize(wxSize(FromDIP(450), -1)); + m_tip_readonly->SetMinSize(wxSize(FromDIP(380), -1)); + m_tip_readonly->SetMaxSize(wxSize(FromDIP(380), -1)); m_tip_readonly->Hide(); m_tip_sizer->Add(m_tip_readonly, 0, wxALIGN_CENTER | wxRIGHT, FromDIP(20)); @@ -420,7 +420,7 @@ void AMSMaterialsSetting::enable_confirm_button(bool en) else { m_tip_readonly->SetLabelText(_L("Setting Virtual slot information while printing is not supported")); } - m_tip_readonly->Wrap(FromDIP(450)); + m_tip_readonly->Wrap(FromDIP(380)); m_tip_readonly->Show(!en); } } diff --git a/src/slic3r/GUI/StatusPanel.cpp b/src/slic3r/GUI/StatusPanel.cpp index d8f37e7f7..75fc0a504 100644 --- a/src/slic3r/GUI/StatusPanel.cpp +++ b/src/slic3r/GUI/StatusPanel.cpp @@ -2738,7 +2738,22 @@ void StatusPanel::update_ams_control_state(bool is_curr_tray_selected) enable[ACTION_BTN_UNLOAD] = false; } else { - if (obj->m_tray_now == "255") { + if (m_ams_control->GetCurentAms() == std::to_string(VIRTUAL_TRAY_ID)) { + 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 if (!m_ams_control->GetCurrentCan(m_ams_control->GetCurentAms()).empty()) { + enable[ACTION_BTN_LOAD] = false; + enable[ACTION_BTN_UNLOAD] = false; + } + + /* if (obj->m_tray_now == "255") { enable[ACTION_BTN_LOAD] = true; enable[ACTION_BTN_UNLOAD] = false; } @@ -2749,7 +2764,7 @@ void StatusPanel::update_ams_control_state(bool is_curr_tray_selected) else { enable[ACTION_BTN_LOAD] = false; enable[ACTION_BTN_UNLOAD] = false; - } + }*/ } } }