This commit is contained in:
Kovid Goyal 2013-01-30 14:49:48 +05:30
parent 7071bdee82
commit 716d55e869
2 changed files with 3 additions and 2 deletions

View File

@ -11,6 +11,7 @@ import sys, shutil, os
from threading import Thread
from glob import glob
import sip
from PyQt4.Qt import (QDialog, QApplication, QLabel, QGridLayout,
QDialogButtonBox, Qt, pyqtSignal, QListWidget,
QListWidgetItem, QSize, QIcon)
@ -76,7 +77,7 @@ class PDFCovers(QDialog):
page_images(self.pdfpath, self.tdir, last=10)
except Exception as e:
self.error = as_unicode(e)
if self.isVisible():
if not sip.isdeleted(self) and self.isVisible():
self.rendering_done.emit()
def show_pages(self):

View File

@ -322,7 +322,7 @@ class MetadataSingleDialogBase(ResizableDialog):
pdfpath = self.formats_manager.get_format_path(self.db, self.book_id,
'pdf')
from calibre.gui2.metadata.pdf_covers import PDFCovers
d = self.__pdf_covers = PDFCovers(pdfpath, parent=self)
d = PDFCovers(pdfpath, parent=self)
if d.exec_() == d.Accepted:
cpath = d.cover_path
if cpath: