Save binded local machines

This commit is contained in:
Noisyfox 2025-01-31 11:35:35 +08:00
parent 82ce8c94b4
commit 2e64cc2f7e
5 changed files with 129 additions and 12 deletions

View file

@ -740,6 +740,11 @@ void SelectMachinePopup::update_user_devices()
op->Bind(EVT_UNBIND_MACHINE, [this, dev, mobj](wxCommandEvent& e) {
dev->set_selected_machine("");
if (mobj) {
AppConfig* config = wxGetApp().app_config;
if (config) {
config->erase_local_machine(mobj->dev_id);
}
mobj->set_access_code("");
mobj->erase_user_access_code();
}