FIX: Force load ams list when click sync button

Change-Id: I579adc9586e0bca85c20be2784b7513361b38f7e
Jira: none
(cherry picked from commit 9c1afdc63c3b1f451d0c8e344eb476e490d1988d)
This commit is contained in:
chunmao.guo 2024-11-04 14:36:18 +08:00 committed by Noisyfox
parent 0aea1c0b4e
commit 75ed8d69fe

View file

@ -1751,6 +1751,11 @@ void Sidebar::load_ams_list(std::string const &device, MachineObject* obj)
void Sidebar::sync_ams_list()
{
// Force load ams list
auto obj = wxGetApp().getDeviceManager()->get_selected_machine();
if (obj)
GUI::wxGetApp().sidebar().load_ams_list(obj->dev_id, obj);
auto & list = wxGetApp().preset_bundle->filament_ams_list;
if (list.empty()) {
MessageDialog dlg(this,