FIX:fixed AMS layout incorrect

jira:[STUDIO-8629]

Change-Id: Id82d47509d18e03362d1f8ff68417668c7338541
This commit is contained in:
tao wang 2024-11-05 21:48:12 +08:00 committed by Lane.Wei
parent b5a6fe52b5
commit ccbf76cee8
2 changed files with 10 additions and 1 deletions

View File

@ -448,7 +448,6 @@ bool MonitorPanel::Show(bool show)
#ifdef __APPLE__ #ifdef __APPLE__
wxGetApp().mainframe->SetMinSize(wxGetApp().plater()->GetMinSize()); wxGetApp().mainframe->SetMinSize(wxGetApp().plater()->GetMinSize());
#endif #endif
NetworkAgent* m_agent = wxGetApp().getAgent(); NetworkAgent* m_agent = wxGetApp().getAgent();
DeviceManager* dev = Slic3r::GUI::wxGetApp().getDeviceManager(); DeviceManager* dev = Slic3r::GUI::wxGetApp().getDeviceManager();
if (show) { if (show) {
@ -475,6 +474,13 @@ bool MonitorPanel::Show(bool show)
stop_update(); stop_update();
m_refresh_timer->Stop(); m_refresh_timer->Stop();
} }
if (obj && !obj->dev_id.empty()) {
select_machine(obj->dev_id);
} else {
select_machine("");
}
return wxPanel::Show(show); return wxPanel::Show(show);
} }

View File

@ -1585,7 +1585,10 @@ void StatusBasePanel::show_ams_group(bool show)
if (m_show_ams_group != show) { Fit(); } if (m_show_ams_group != show) { Fit(); }
m_show_ams_group = show; m_show_ams_group = show;
m_show_ams_group_reset = false; m_show_ams_group_reset = false;
m_ams_control->Layout();
m_ams_control->Fit();
Layout(); Layout();
Fit();
} }
} }