Procházet zdrojové kódy

Bug #1241 : getTruncatedLabel always return non-empty string

sferot před 12 roky
rodič
revize
562079126d
1 změnil soubory, kde provedl 3 přidání a 0 odebrání
  1. 3 0
      pboard/pboard/model/data.py

+ 3 - 0
pboard/pboard/model/data.py Zobrazit soubor

363
     if liMaxLength>0 and len(lsTruncatedLabel)>liMaxLength:
363
     if liMaxLength>0 and len(lsTruncatedLabel)>liMaxLength:
364
       lsTruncatedLabel = lsTruncatedLabel[0:liMaxLength-1]+'…'
364
       lsTruncatedLabel = lsTruncatedLabel[0:liMaxLength-1]+'…'
365
 
365
 
366
+    if lsTruncatedLabel=='':
367
+        lsTruncatedLabel = _('Titleless Document')
368
+
366
     return lsTruncatedLabel
369
     return lsTruncatedLabel
367
 
370
 
368
   def getTruncatedContentAsText(self, piCharNb):
371
   def getTruncatedContentAsText(self, piCharNb):