mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-14 02:07:54 -06:00
ENH:actively select a printer on the calibration page
fixed:https://github.com/bambulab/BambuStudio/issues/2054 Change-Id: I087eebcda934c4f2447f2dc6e473a8389e9d4a25
This commit is contained in:
parent
5f8e285624
commit
386607a6a7
1 changed files with 16 additions and 0 deletions
|
@ -653,6 +653,22 @@ bool CalibrationPanel::Show(bool show) {
|
||||||
m_refresh_timer->SetOwner(this);
|
m_refresh_timer->SetOwner(this);
|
||||||
m_refresh_timer->Start(REFRESH_INTERVAL);
|
m_refresh_timer->Start(REFRESH_INTERVAL);
|
||||||
wxPostEvent(this, wxTimerEvent());
|
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 {
|
else {
|
||||||
m_refresh_timer->Stop();
|
m_refresh_timer->Stop();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue