ENH: default to reconnect, not check the out of date object

jira: [STUDIO-10820]
Change-Id: If3c332acab8fc91f60b35de6be367d310c8d7a9d
This commit is contained in:
xin.zhang 2025-04-11 11:56:33 +08:00 committed by lane.wei
parent 582e377836
commit 6683df367f
1 changed files with 3 additions and 7 deletions

View File

@ -2586,14 +2586,10 @@ void GUI_App::MacPowerCallBack(void* refcon, io_service_t service, natural_t mes
}
else if(messageType == kIOMessageSystemHasPoweredOn)
{
if (dev_manager)
if (dev_manager && !last_selected_machine.empty())
{
MachineObject* obj = dev_manager->get_selected_machine();
if (!obj && !last_selected_machine.empty())
{
dev_manager->set_selected_machine(last_selected_machine);
BOOST_LOG_TRIVIAL(info) << "MacPowerCallBack restore selected machine:" << last_selected_machine;
}
dev_manager->set_selected_machine(last_selected_machine, true);
BOOST_LOG_TRIVIAL(info) << "MacPowerCallBack restore selected machine:" << last_selected_machine;
}
};
}