From 70dee4a0298b1e4ba490c3b06c349dcfc14b7941 Mon Sep 17 00:00:00 2001 From: James Turner Date: Sun, 16 Mar 2014 16:21:06 +0000 Subject: [PATCH] Avoid a warning from GPS dialog. --- gui/dialogs/gps.xml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/gui/dialogs/gps.xml b/gui/dialogs/gps.xml index 7e8edc0bf..151cb2caf 100644 --- a/gui/dialogs/gps.xml +++ b/gui/dialogs/gps.xml @@ -137,7 +137,9 @@ } # restore state from previous time the dialog was open - updateSearchResults(0, dlg.getNode("scratch-index", 1).getValue()); + # default to 0 if no prior value + var curIndex = dlg.getNode("scratch-index", 1).getValue() or 0; + updateSearchResults(0, curIndex); var slaved = props.globals.getNode("/instrumentation/nav[0]/slaved-to-gps", 1); ]]>