Skip to content
Snippets Groups Projects
Commit 8e5a9cf2 authored by deuce's avatar deuce
Browse files

Make the current item reflect the last retval.

***NOTE***
Current is the first item that had the returned retval, NOT necessarily
the selected item (if the same retval is used by multiple items)
parent 23e149c2
Branches
Tags
No related merge requests found
...@@ -98,8 +98,16 @@ function Lightbar_getval(current) ...@@ -98,8 +98,16 @@ function Lightbar_getval(current)
return(null); return(null);
if(this.items[i].retval==undefined) if(this.items[i].retval==undefined)
return(undefined); return(undefined);
return(this.items[i].retval); retval=this.items[i].retval;
} }
for(i=0; i<this.items.length; i++) {
if(retval==this.items[i].retval) {
this.current=i;
break;
}
}
return(retval);
} }
/* /*
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment