[qcookboob] no shortdesc case
This commit is contained in:
parent
3c993099b0
commit
fb39dcd825
1 changed files with 6 additions and 3 deletions
|
|
@ -37,10 +37,13 @@ class MiniRecipe(QFrame):
|
|||
self.backend = backend
|
||||
self.recipe = recipe
|
||||
self.ui.titleLabel.setText(recipe.title)
|
||||
if len(recipe.short_description) > 300:
|
||||
self.ui.shortDescLabel.setText('%s [...]'%recipe.short_description[:300])
|
||||
if not empty(recipe.short_description):
|
||||
if len(recipe.short_description) > 300:
|
||||
self.ui.shortDescLabel.setText('%s [...]'%recipe.short_description[:300])
|
||||
else:
|
||||
self.ui.shortDescLabel.setText(recipe.short_description)
|
||||
else:
|
||||
self.ui.shortDescLabel.setText(recipe.short_description)
|
||||
self.ui.shortDescLabel.setText('')
|
||||
self.ui.backendLabel.setText(backend.name)
|
||||
|
||||
self.gotThumbnail()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue