Skip to content

Commit

Permalink
Code Style: Ensure that each operation argument is separated by a comma
Browse files Browse the repository at this point in the history
Igor Pro does allow omitting the comma between the first and second
argument of an operation and also allows adding extranous commas before
the first argument.

This isn't considered as good coding style [1].

[1]: byte-physics/igor-pro-coding-conventions#33
  • Loading branch information
Garados007 committed Jul 28, 2023
1 parent 9a2679f commit b5d62f3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions procedures/CodeBrowser_gui.ipf
Original file line number Diff line number Diff line change
Expand Up @@ -421,19 +421,19 @@ Function updatePopup(ctrlName)
list = GetUserData(panel, "PopupProcedure", userDataNiceList)

if(ItemsInList(list) == 1)
PopupMenu $ctrlName win=$panel, disable=2
PopupMenu $ctrlName, win=$panel, disable=2
else
PopupMenu $ctrlName win=$panel, disable=0
PopupMenu $ctrlName, win=$panel, disable=0
endif

// try to restore the previously selected item if it differs from the current one
variable newIndex = WhichListItem(itemText, list) + 1

if(newIndex != index) // only update if required, as the update triggers the list generating function
if(newIndex > 0)
PopupMenu $ctrlName win=$panel, mode=newIndex
PopupMenu $ctrlName, win=$panel, mode=newIndex
else
PopupMenu $ctrlName win=$panel, mode=1
PopupMenu $ctrlName, win=$panel, mode=1
endif
endif
End
Expand Down
2 changes: 1 addition & 1 deletion procedures/CodeBrowser_preferences.ipf
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ static Function SyncPackagePrefsStruct(prefs)
// Panel does exists. Set prefs to match panel settings.
prefs.version = kPrefsVersion

GetWindow $GetPanel() wsize // returns points
GetWindow $GetPanel(), wsize // returns points

#if (IgorVersion() >= 7.0)
scale = ScreenResolution / PanelResolution(GetPanel())
Expand Down

0 comments on commit b5d62f3

Please sign in to comment.