FIX: hide the internal HMS message

jira: [STUDIO-10363]
Change-Id: I0b68d8ddde4b1b1277fd828e17f568fcdc81adb6
This commit is contained in:
xin.zhang 2025-02-19 10:04:26 +08:00 committed by lane.wei
parent b36c41e514
commit b10ab77447
3 changed files with 12 additions and 6 deletions

View File

@ -188,11 +188,11 @@ HMSPanel::~HMSPanel() {
}
void HMSPanel::append_hms_panel(const std::string& dev_id, HMSItem& item) {
m_notify_item = new HMSNotifyItem(dev_id, m_scrolledWindow, item);
wxString msg = wxGetApp().get_hms_query()->query_hms_msg(dev_id, item.get_long_error_code());
if (!msg.empty())
m_top_sizer->Add(m_notify_item, 0, wxALIGN_CENTER_HORIZONTAL);
else {
if (!msg.empty()) {
HMSNotifyItem *notify_item = new HMSNotifyItem(dev_id, m_scrolledWindow, item);
m_top_sizer->Add(notify_item, 0, wxALIGN_CENTER_HORIZONTAL);
} else {
// debug for hms display error info
// m_top_sizer->Add(m_notify_item, 0, wxALIGN_CENTER_HORIZONTAL);
BOOST_LOG_TRIVIAL(info) << "hms: do not display empty_item";

View File

@ -47,13 +47,13 @@ class HMSPanel : public wxPanel
protected:
wxScrolledWindow *m_scrolledWindow;
wxBoxSizer * m_top_sizer;
HMSNotifyItem * m_notify_item;
int last_status;
void append_hms_panel(const std::string& dev_id, HMSItem &item);
void delete_hms_panels();
public:
HMSPanel(wxWindow *parent, wxWindowID id = wxID_ANY, const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize, long style = wxTAB_TRAVERSAL);
~HMSPanel();

View File

@ -439,6 +439,12 @@ void MonitorPanel::update_all()
void MonitorPanel::update_hms_tag()
{
for (auto hmsitem : m_hms_panel->temp_hms_list) {
if (!obj) { break;}
const wxString &msg = wxGetApp().get_hms_query()->query_hms_msg(obj->dev_id, hmsitem.second.get_long_error_code());
if (msg.empty()){ continue;} /*STUDIO-10363 it's hidden message*/
if (!hmsitem.second.already_read) {
//show HMS new tag
m_tabpanel->GetBtnsListCtrl()->showNewTag(3, true);