Skip to content

Commit

Permalink
Re-order default tabs so Home is first (#231)
Browse files Browse the repository at this point in the history
  • Loading branch information
Alex L. Urban authored Mar 18, 2019
1 parent 925a85c commit a947987
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions gwsumm/tabs/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -1134,12 +1134,14 @@ def get_hierarchy(self):

@staticmethod
def _sortkey(tab):
if tab.shortname == 'Summary' and tab.parent is None:
if 'Home' in tab.shortname:
return 1
elif tab.shortname == 'Summary':
if tab.shortname == 'Summary' and tab.parent is None:
return 2
elif 'ODC' in tab.shortname:
elif tab.shortname == 'Summary':
return 3
elif 'ODC' in tab.shortname:
return 4
elif tab.shortname.islower():
return tab.shortname.upper()
else:
Expand Down

0 comments on commit a947987

Please sign in to comment.