mirror of
https://github.com/iNavFlight/inav-configurator.git
synced 2025-07-13 11:29:53 +03:00
Fix welcome tab being cleared after failing to connect to a port.
This commit is contained in:
parent
24d5f0de70
commit
a56c0eef40
1 changed files with 6 additions and 2 deletions
|
@ -25,6 +25,8 @@ $(document).ready(function () {
|
|||
|
||||
serial.disconnect(onClosed);
|
||||
|
||||
var wasConnected = CONFIGURATOR.connectionValid;
|
||||
|
||||
GUI.connected_to = false;
|
||||
CONFIGURATOR.connectionValid = false;
|
||||
GUI.allowedTabs = GUI.defaultAllowedTabsWhenDisconnected.slice();
|
||||
|
@ -46,8 +48,10 @@ $(document).ready(function () {
|
|||
// reset active sensor indicators
|
||||
sensor_status(0);
|
||||
|
||||
// detach listeners and remove element data
|
||||
$('#content').empty();
|
||||
if (wasConnected) {
|
||||
// detach listeners and remove element data
|
||||
$('#content').empty();
|
||||
}
|
||||
|
||||
$('#tabs .tab_landing a').click();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue