ENH:only one subscription check is supported
Change-Id: I94e2cb9619f7292b7836b47cfceaf7f4ed26f2c4
This commit is contained in:
parent
6c8f82334e
commit
f1ef4476dd
|
@ -2225,6 +2225,7 @@ void GUI_App::on_start_subscribe_again(std::string dev_id)
|
||||||
{
|
{
|
||||||
auto start_subscribe_timer = new wxTimer(this, wxID_ANY);
|
auto start_subscribe_timer = new wxTimer(this, wxID_ANY);
|
||||||
Bind(wxEVT_TIMER, [this, start_subscribe_timer, dev_id](auto& e) {
|
Bind(wxEVT_TIMER, [this, start_subscribe_timer, dev_id](auto& e) {
|
||||||
|
start_subscribe_timer->Stop();
|
||||||
Slic3r::DeviceManager* dev = Slic3r::GUI::wxGetApp().getDeviceManager();
|
Slic3r::DeviceManager* dev = Slic3r::GUI::wxGetApp().getDeviceManager();
|
||||||
if (!dev) return;
|
if (!dev) return;
|
||||||
MachineObject* obj = dev->get_selected_machine();
|
MachineObject* obj = dev->get_selected_machine();
|
||||||
|
@ -2234,8 +2235,6 @@ void GUI_App::on_start_subscribe_again(std::string dev_id)
|
||||||
if(wxGetApp().getAgent()) wxGetApp().getAgent()->set_user_selected_machine(dev_id);
|
if(wxGetApp().getAgent()) wxGetApp().getAgent()->set_user_selected_machine(dev_id);
|
||||||
BOOST_LOG_TRIVIAL(info) << __FUNCTION__ << ": dev_id=" << obj->dev_id;
|
BOOST_LOG_TRIVIAL(info) << __FUNCTION__ << ": dev_id=" << obj->dev_id;
|
||||||
}
|
}
|
||||||
|
|
||||||
start_subscribe_timer->Stop();
|
|
||||||
});
|
});
|
||||||
start_subscribe_timer->Start(4000, wxTIMER_ONE_SHOT);
|
start_subscribe_timer->Start(4000, wxTIMER_ONE_SHOT);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue