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

View File

@ -1771,7 +1771,12 @@ text/plain
groupname = notebooktablabel.get_title() groupname = notebooktablabel.get_title()
if groupname == "": 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) self.add_group(groupname)
for term in terms: for term in terms: