Fix #4848 (Error on opening (viewing) .lrf books in Calibre v. 0.6.39)

This commit is contained in:
Kovid Goyal 2010-02-10 08:11:41 -07:00
parent 2ad4eb09cf
commit 48d0d695e0

View File

@ -481,9 +481,10 @@ class Line(QGraphicsItem):
painter.restore()
painter.save()
painter.setPen(QPen(Qt.NoPen))
for c in self.children():
painter.setBrush(c.brush)
painter.drawRect(c.boundingRect())
if hasattr(self, 'children'):
for c in self.children():
painter.setBrush(c.brush)
painter.drawRect(c.boundingRect())
painter.restore()
painter.save()
for tok in self.tokens: