FIX: fix display error in virtual tray
refine description for ams not connected Change-Id: Ic4c01e69cfd9385548a497af5c5c3071614067a2 Signed-off-by: Stone Li <stone.li@bambulab.com> (cherry picked from commit 4158f1e06ed20fa5dd4c3ef412d4c8fab76054a8)
This commit is contained in:
parent
c56d0d8041
commit
b2a752110e
|
@ -423,6 +423,7 @@ void ExtrusionCalibration::update()
|
||||||
show_info(true, true, tips);
|
show_info(true, true, tips);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
get_bed_type_incompatible(true);
|
||||||
show_info(true, false, _L("Calibration completed"));
|
show_info(true, false, _L("Calibration completed"));
|
||||||
}
|
}
|
||||||
m_cali_cancel->Hide();
|
m_cali_cancel->Hide();
|
||||||
|
@ -433,6 +434,7 @@ void ExtrusionCalibration::update()
|
||||||
wxString tips = get_bed_type_incompatible(false);
|
wxString tips = get_bed_type_incompatible(false);
|
||||||
show_info(true, true, tips);
|
show_info(true, true, tips);
|
||||||
} else {
|
} else {
|
||||||
|
get_bed_type_incompatible(true);
|
||||||
show_info(true, false, wxEmptyString);
|
show_info(true, false, wxEmptyString);
|
||||||
}
|
}
|
||||||
m_cali_cancel->Hide();
|
m_cali_cancel->Hide();
|
||||||
|
|
|
@ -1901,6 +1901,10 @@ void StatusPanel::update_ams(MachineObject *obj)
|
||||||
last_ams_version = -1;
|
last_ams_version = -1;
|
||||||
BOOST_LOG_TRIVIAL(trace) << "machine object" << obj->dev_name << " was disconnected, set show_ams_group is false";
|
BOOST_LOG_TRIVIAL(trace) << "machine object" << obj->dev_name << " was disconnected, set show_ams_group is false";
|
||||||
}
|
}
|
||||||
|
bool is_support_extrusion_cali = obj->is_function_supported(PrinterFunction::FUNC_EXTRUSION_CALI);
|
||||||
|
if (is_support_extrusion_cali) {
|
||||||
|
m_ams_control->update_vams_kn_value(obj->vt_tray);
|
||||||
|
}
|
||||||
show_ams_group(false, obj->is_function_supported(PrinterFunction::FUNC_EXTRUSION_CALI));
|
show_ams_group(false, obj->is_function_supported(PrinterFunction::FUNC_EXTRUSION_CALI));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -599,8 +599,8 @@ void AMSLib::render(wxDC &dc)
|
||||||
|
|
||||||
//draw k&n
|
//draw k&n
|
||||||
if (m_show_kn) {
|
if (m_show_kn) {
|
||||||
wxString str_k = wxString::Format("k %1.3f", m_info.k);
|
wxString str_k = wxString::Format("K %1.3f", m_info.k);
|
||||||
wxString str_n = wxString::Format("n %1.3f", m_info.n);
|
wxString str_n = wxString::Format("N %1.3f", m_info.n);
|
||||||
dc.SetFont(::Label::Body_11);
|
dc.SetFont(::Label::Body_11);
|
||||||
auto tsize = dc.GetMultiLineTextExtent(str_k);
|
auto tsize = dc.GetMultiLineTextExtent(str_k);
|
||||||
auto pot_k = wxPoint((libsize.x - tsize.x) / 2, (libsize.y - tsize.y) / 2 - FromDIP(9) + tsize.y);
|
auto pot_k = wxPoint((libsize.x - tsize.x) / 2, (libsize.y - tsize.y) / 2 - FromDIP(9) + tsize.y);
|
||||||
|
@ -1585,7 +1585,7 @@ AMSControl::AMSControl(wxWindow *parent, wxWindowID id, const wxPoint &pos, cons
|
||||||
m_none_ams_panel->SetBackgroundColour(AMS_CONTROL_DEF_BLOCK_BK_COLOUR);
|
m_none_ams_panel->SetBackgroundColour(AMS_CONTROL_DEF_BLOCK_BK_COLOUR);
|
||||||
//m_none_ams_panel->SetDoubleBuffered(true);
|
//m_none_ams_panel->SetDoubleBuffered(true);
|
||||||
|
|
||||||
auto m_tip_none_ams = new wxStaticText(m_none_ams_panel, wxID_ANY, _L("NO AMS"), wxDefaultPosition, wxDefaultSize, wxALIGN_CENTER_HORIZONTAL);
|
auto m_tip_none_ams = new wxStaticText(m_none_ams_panel, wxID_ANY, _L("AMS not connected"), wxDefaultPosition, wxDefaultSize, wxALIGN_CENTER_HORIZONTAL);
|
||||||
m_tip_none_ams->SetMinSize(wxSize(AMS_CANS_SIZE.x - FromDIP(20), -1));
|
m_tip_none_ams->SetMinSize(wxSize(AMS_CANS_SIZE.x - FromDIP(20), -1));
|
||||||
m_tip_none_ams->SetFont(::Label::Head_16);
|
m_tip_none_ams->SetFont(::Label::Head_16);
|
||||||
m_tip_none_ams->SetForegroundColour(AMS_CONTROL_DISABLE_COLOUR);
|
m_tip_none_ams->SetForegroundColour(AMS_CONTROL_DISABLE_COLOUR);
|
||||||
|
|
Loading…
Reference in New Issue