Skip to content

Commit 3f179b1

Browse files
jccostadoutriaux1
authored andcommitted
Fix for template name collision bug. (#2087)
* Fix for template name collision bug. * Removed whitespaces. * Fixed alignment and whitespaces.(Again).
1 parent dfa7943 commit 3f179b1

1 file changed

Lines changed: 8 additions & 2 deletions

File tree

Lib/Multi.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,7 @@ def clean(self):
229229
self.x.removeP(t)
230230
self.template_names=[]
231231

232-
def get(self,column=None,row=None,legend=None,font=True,fontlimit=0.8):
232+
def get(self,column=None,row=None,legend=None,font=True,fontlimit=0.8,tname=None):
233233
"""
234234
Returns a template to use in vcs
235235
Usage:
@@ -261,7 +261,13 @@ def get(self,column=None,row=None,legend=None,font=True,fontlimit=0.8):
261261

262262
xl=0 # offset for legend in x
263263
yl=0 # offset for legend in y
264-
nm = '%i_x_%i_%i' % (column,row,self.id)
264+
#nm = '%i_x_%i_%i' % (column,row,self.id)
265+
nm = None
266+
if tname is not None:
267+
nm = '%i_x_%i_%i_%s' % (column,row,self.id,tname)
268+
else:
269+
nm = '%i_x_%i_%i' % (column,row,self.id)
270+
265271
try:
266272
t=self.x.createtemplate(nm,source=self.template)
267273
self.template_names.append(t.name)

0 commit comments

Comments
 (0)