🐛 Prevent "no port found" flicker on initial load
Only show the warning if we have fetched the port options and they are empty.
This commit is contained in:
1 parent
cd0a96827b
commit
42d3084bb8
1 file changed
+3
@@ -21,6 +21,7 @@ $(function () {
|
||||
self.selectedPrinter(self.printerProfiles.currentProfile());
|
||||
});
|
||||
|
||||
self.portOptionsFetched = ko.observable(false);
|
||||
self.portOptions = ko.observableArray(undefined);
|
||||
self.baudrateOptions = ko.observableArray(undefined);
|
||||
self.printerOptions = ko.observableArray(undefined);
|
||||
@@ -53,6 +54,7 @@ $(function () {
|
||||
|
||||
self.validPort = ko.pureComputed(function () {
|
||||
return (
|
||||
!self.portOptionsFetched() ||
|
||||
self.portOptions().length > 0 ||
|
||||
self.settings.settings.serial.ignoreEmptyPorts()
|
||||
);
|
||||
@@ -119,6 +121,7 @@ $(function () {
|
||||
}
|
||||
|
||||
self.saveSettings(false);
|
||||
self.portOptionsFetched(true);
|
||||
};
|
||||
|
||||
self.fromHistoryData = function (data) {
|
||||
|
||||
Reference in new issue
Block a user