Kaynağa Gözat

Bug #1241 : getTruncatedLabel always return non-empty string

sferot 10 yıl önce
ebeveyn
işleme
562079126d
1 değiştirilmiş dosya ile 3 ekleme ve 0 silme
  1. 3 0
      pboard/pboard/model/data.py

+ 3 - 0
pboard/pboard/model/data.py Dosyayı Görüntüle

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