From 386607a6a72305d0a0ccb675b459ba58a0eb228f Mon Sep 17 00:00:00 2001 From: tao wang Date: Tue, 18 Jul 2023 15:53:46 +0800 Subject: [PATCH] ENH:actively select a printer on the calibration page fixed:https://github.com/bambulab/BambuStudio/issues/2054 Change-Id: I087eebcda934c4f2447f2dc6e473a8389e9d4a25 --- src/slic3r/GUI/CalibrationPanel.cpp | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/slic3r/GUI/CalibrationPanel.cpp b/src/slic3r/GUI/CalibrationPanel.cpp index 5ecc3eeda..be608eafe 100644 --- a/src/slic3r/GUI/CalibrationPanel.cpp +++ b/src/slic3r/GUI/CalibrationPanel.cpp @@ -653,6 +653,22 @@ bool CalibrationPanel::Show(bool show) { m_refresh_timer->SetOwner(this); m_refresh_timer->Start(REFRESH_INTERVAL); wxPostEvent(this, wxTimerEvent()); + + DeviceManager* dev = Slic3r::GUI::wxGetApp().getDeviceManager(); + if (dev) { + //set a default machine when obj is null + obj = dev->get_selected_machine(); + if (obj == nullptr) { + dev->load_last_machine(); + obj = dev->get_selected_machine(); + if (obj) + GUI::wxGetApp().sidebar().load_ams_list(obj->dev_id, obj); + } + else { + obj->reset_update_time(); + } + } + } else { m_refresh_timer->Stop();