Make sure we don't re-use a tab group name which exists already

This commit is contained in:
Chris Jones 2009-12-01 23:14:42 +00:00
parent 3aa86e4db0
commit 27ba562f56
1 changed files with 6 additions and 1 deletions

View File

@ -1771,7 +1771,12 @@ text/plain
groupname = notebooktablabel.get_title()
if groupname == "":
groupname = "Tab %d" % (pagenum + 1)
tmppagenum = pagenum
while True:
groupname = "Tab %d" % (tmppagenum + 1)
if groupname not in self.terminator.groupings:
break
tmppagenum += 1
self.add_group(groupname)
for term in terms: