Quit gracefully after closing the main window.

This commit is contained in:
Andrey Golovizin 2014-08-28 23:38:50 +02:00
parent 96347646bb
commit 44c2cce96e

View file

@ -23,6 +23,9 @@ from PyQt4.QtCore import (
slot,
QThread,
)
from PyQt4.QtGui import (
qApp
)
from ..image import Image
from ..page import Page, Glyph, Space
@ -68,6 +71,7 @@ class OCREngine(QThread):
yield self.recognize_glyph(glyph)
def recognize_glyph(self, glyph):
qApp.processEvents()
if isinstance(glyph, Space):
return ' '
try: