Merge pull request #2660 from haslinghuis/fix_tab_switch

Fix tab switching
10.8-maintenance
ctzsnooze 2021-11-27 11:05:44 +11:00 committed by GitHub
commit 7040a5b390
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 1 deletions

View File

@ -250,10 +250,12 @@ function startProcess() {
const tab = tabClass.substring(4); const tab = tabClass.substring(4);
const tabName = $(self).text(); const tabName = $(self).text();
let timeout = 0;
if (GUI.active_tab === 'pid_tuning') { if (GUI.active_tab === 'pid_tuning') {
if (TABS.pid_tuning.retainConfiguration) { if (TABS.pid_tuning.retainConfiguration) {
TABS.pid_tuning.restoreInitialSettings(); TABS.pid_tuning.restoreInitialSettings();
timeout = 100;
} }
} }
@ -399,7 +401,8 @@ function startProcess() {
TABS.onboard_logging.initialize(content_ready); TABS.onboard_logging.initialize(content_ready);
break; break;
case 'cli': case 'cli':
TABS.cli.initialize(content_ready, GUI.nwGui); // Add a little timeout to let MSP comands finish
GUI.timeout_add('wait_for_msp_finished', () => TABS.cli.initialize(content_ready, GUI.nwGui), timeout);
break; break;
case 'presets': case 'presets':
TABS.presets.initialize(content_ready, GUI.nwGui); TABS.presets.initialize(content_ready, GUI.nwGui);