@@ -211,11 +211,13 @@ End
211
211
// Returns the currently selected item from the panel defined by the optional arguments.
212
212
// Exactly one optional argument must be given.
213
213
//
214
- // module: Module from ProcGlobal/Independent Module list
215
- // procedure: "myProcedure.ipf [moduleName]"
216
- // procedureWithModule: "myProcedure.ipf"
217
- // index: Zero-based index into main listbox
218
- Function /S getCurrentItem ( [ module, procedure,procedureWithoutModule, index] )
214
+ // @param module: Module from ProcGlobal/Independent Module list
215
+ // @param procedure: "myProcedure.ipf [moduleName]"
216
+ // @param procedureWithModule: "myProcedure.ipf"
217
+ // @param index: Zero-based index into main listbox
218
+ //
219
+ // @returns the currently selected item
220
+ Function /S getCurrentItem ( [ module, procedure, procedureWithoutModule, index] )
219
221
variable module, procedureWithoutModule, procedure, index
220
222
221
223
string procName
@@ -304,7 +306,7 @@ Function getCurrentItemAsNumeric([module, procedure, index, indexTop])
304
306
return -1 // error
305
307
End
306
308
307
- // Updates the the given popup menu
309
+ // Updates the given popup menu
308
310
// Tries to preserve the currently selected item
309
311
Function updatePopup ( ctrlName)
310
312
string ctrlName
@@ -320,7 +322,7 @@ Function updatePopup(ctrlName)
320
322
321
323
ControlUpdate / W=$ panel $ ctrlName
322
324
323
- list = GetUserData ( panel, procCtrl, userDataNiceList)
325
+ list = GetUserData ( panel, procCtrl, userDataNiceList)
324
326
325
327
if ( ItemsInList ( list) == 1 )
326
328
PopupMenu $ ctrlName win=$ panel, disable=2
@@ -329,10 +331,10 @@ Function updatePopup(ctrlName)
329
331
endif
330
332
331
333
// try to restore the previously selected item if it differs from the current one
332
- variable newIndex = WhichListItem ( itemText, list) + 1
334
+ variable newIndex = WhichListItem ( itemText, list) + 1
333
335
334
336
if ( newIndex != index) // only update if required, as the update triggers the list generating function
335
- if ( newIndex > 0 )
337
+ if ( newIndex > 0 )
336
338
PopupMenu $ ctrlName win=$ panel, mode= newIndex
337
339
else
338
340
PopupMenu $ ctrlName win=$ panel, mode=1
0 commit comments