Fix #5889 (version 0.7.3 for Macintosh - ZeroDivisionError:float division)

This commit is contained in:
Kovid Goyal 2010-06-19 16:41:06 -06:00
parent 0f408cce58
commit caa451213e
2 changed files with 3 additions and 1 deletions

View File

@ -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.')

View File

@ -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,