FIX: update codes with master

JIRA: [STUDIO-13536]
Change-Id: Ibf1bbc74787b4894cceebf703406848d99f9b8eb
(cherry picked from commit 20a644da6a80664a54d68835f49867813db8af83)
This commit is contained in:
xin.zhang
2025-07-22 14:19:55 +08:00
committed by Noisyfox
parent 26dcf805e6
commit 4b06a552b6

View File

@@ -182,6 +182,7 @@ MonitorPanel::~MonitorPanel()
m_media_file_panel->SwitchStorage(title == _L("Storage")); m_media_file_panel->SwitchStorage(title == _L("Storage"));
} }
page->SetFocus(); page->SetFocus();
update_all();
}, m_tabpanel->GetId()); }, m_tabpanel->GetId());
//m_status_add_machine_panel = new AddMachinePanel(m_tabpanel); //m_status_add_machine_panel = new AddMachinePanel(m_tabpanel);
@@ -330,6 +331,9 @@ void MonitorPanel::on_size(wxSizeEvent &event)
void MonitorPanel::update_all() void MonitorPanel::update_all()
{ {
if (!m_initialized)
return;
NetworkAgent* m_agent = wxGetApp().getAgent(); NetworkAgent* m_agent = wxGetApp().getAgent();
Slic3r::DeviceManager* dev = Slic3r::GUI::wxGetApp().getDeviceManager(); Slic3r::DeviceManager* dev = Slic3r::GUI::wxGetApp().getDeviceManager();
if (!dev) return; if (!dev) return;
@@ -366,6 +370,8 @@ void MonitorPanel::update_all()
auto current_page = m_tabpanel->GetCurrentPage(); auto current_page = m_tabpanel->GetCurrentPage();
if (current_page == m_status_info_panel) { if (current_page == m_status_info_panel) {
m_status_info_panel->obj = obj;
m_status_info_panel->m_media_play_ctrl->SetMachineObject(obj);
m_status_info_panel->update(obj); m_status_info_panel->update(obj);
} else if (current_page == m_upgrade_panel) { } else if (current_page == m_upgrade_panel) {
m_upgrade_panel->update(obj); m_upgrade_panel->update(obj);
@@ -373,16 +379,10 @@ void MonitorPanel::update_all()
m_media_file_panel->UpdateByObj(obj); m_media_file_panel->UpdateByObj(obj);
} }
if (m_hms_panel->IsShown() || (obj->hms_list.size() != m_hms_panel->temp_hms_list.size())) { if (current_page == m_hms_panel || (obj->hms_list.size() != m_hms_panel->temp_hms_list.size())) {
m_hms_panel->update(obj); m_hms_panel->update(obj);
} }
#if !BBL_RELEASE_TO_PUBLIC
if (m_upgrade_panel->IsShown()) {
m_upgrade_panel->update(obj);
}
#endif
update_hms_tag(); update_hms_tag();
} }