Mercurial > getan
changeset 260:e206ab753a26
Set empty project_footer if no projects are available
Fixes also a crash when the footer is reset.
author | Björn Ricks <bjoern.ricks@intevation.de> |
---|---|
date | Thu, 11 Apr 2013 12:06:09 +0200 |
parents | b6e91535acb7 |
children | cf905ed23de0 |
files | getan/view.py |
diffstat | 1 files changed, 4 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/getan/view.py Thu Apr 11 11:54:06 2013 +0200 +++ b/getan/view.py Thu Apr 11 12:06:09 2013 +0200 @@ -196,6 +196,7 @@ def _total_time(self): if not self.rows: + self.set_footer_text("", "project_footer") return logger.debug("ProjectList: update projects total time.") total = 0 @@ -213,6 +214,9 @@ self.set_footer_text(text, attr, False) def reset_footer(self): + if not self.rows: + self.set_footer_text("", "project_footer") + return logger.debug("ProjectList: reset_footer to '%s'" % self._footer_info[0]) self.set_footer_text(*self._footer_info)