fix a couple of bugs with custom device names and ui state

This commit is contained in:
Stewart Allen 2020-06-20 23:05:29 -04:00
commit c52ee009af

View file

@ -548,7 +548,6 @@
let code = devices[API.mode.get_lower()][devicename];
setDeviceCode(code, devicename);
}
// $('selected-device').innerHTML = devicename;
}
// only for local filters
@ -653,8 +652,12 @@
current.filter[mode] = devicename;
current.cdev[mode] = dev;
// restore last process associated with this device
if (dproc) API.conf.load(null, dproc);
if (dproc) {
// restore last process associated with this device
API.conf.load(null, dproc);
} else {
API.conf.update();
}
API.conf.save();
} catch (e) {
@ -677,6 +680,7 @@
delete devs[selected];
UI.deviceSave.onclick();
selectDevice(newname);
updateDeviceList();
}
}