From caa451213e94f37366dcf29a932c997de2f9b61d Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sat, 19 Jun 2010 16:41:06 -0600 Subject: [PATCH] Fix #5889 (version 0.7.3 for Macintosh - ZeroDivisionError:float division) --- src/calibre/ebooks/epub/output.py | 2 +- src/calibre/gui2/book_details.py | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/calibre/ebooks/epub/output.py b/src/calibre/ebooks/epub/output.py index 8708b98d97..75739e6a69 100644 --- a/src/calibre/ebooks/epub/output.py +++ b/src/calibre/ebooks/epub/output.py @@ -84,7 +84,7 @@ class EPUBOutput(OutputFormatPlugin): OptionRecommendation(name='no_svg_cover', recommended_value=False, help=_('Do not use SVG for the book cover. Use this option if ' - 'your EPUB is going to be used ona device that does not ' + 'your EPUB is going to be used on a device that does not ' 'support SVG, like the iPhone or the JetBook Lite. ' 'Without this option, such devices will display the cover ' 'as a blank page.') diff --git a/src/calibre/gui2/book_details.py b/src/calibre/gui2/book_details.py index 8759dd360b..6d7cfed6ff 100644 --- a/src/calibre/gui2/book_details.py +++ b/src/calibre/gui2/book_details.py @@ -93,6 +93,8 @@ class CoverView(QWidget): # {{{ self._current_pixmap_size = val def do_layout(self): + if self.rect().width() == 0 or self.rect().height() == 0: + return pixmap = self.pixmap pwidth, pheight = pixmap.width(), pixmap.height() self.pwidth, self.pheight = fit_image(pwidth, pheight,