Merge pull request #3670 from geniusgogo/master
Optimize project group sort by name
This commit is contained in:
commit
90e67a5ecd
|
@ -675,8 +675,17 @@ def DefineGroup(name, src, depend, **parameters):
|
|||
MergeGroup(g, group)
|
||||
return objs
|
||||
|
||||
def PriorityInsertGroup(groups, group):
|
||||
length = len(groups)
|
||||
for i in range(0, length):
|
||||
if cmp(groups[i]['name'].lower(), group['name'].lower()) > 0:
|
||||
groups.insert(i, group)
|
||||
return
|
||||
groups.append(group)
|
||||
|
||||
# add a new group
|
||||
Projects.append(group)
|
||||
#Projects.append(group)
|
||||
PriorityInsertGroup(Projects, group)
|
||||
|
||||
return objs
|
||||
|
||||
|
|
Loading…
Reference in New Issue