[ocrfeeder] Clear the reviewer's contents only after the recognition has finished
- From: Joaquim Manuel Pereira Rocha <jrocha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [ocrfeeder] Clear the reviewer's contents only after the recognition has finished
- Date: Tue, 27 Jul 2010 22:14:59 +0000 (UTC)
commit 4bdb913c3eab882ce6af9351ba9da764cd4f7bad
Author: Joaquim Rocha <jrocha igalia com>
Date: Wed Jul 14 18:07:05 2010 +0200
Clear the reviewer's contents only after the recognition has finished
widgetModeler.Reviewer_Controler: Move the clearance of the content
areas and editors from the method that calls the document's recognition
to the finish callback.
This avoids losing the contents if the user later decides to eventually
cancel the recognition operation.
studio/widgetModeler.py | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/studio/widgetModeler.py b/studio/widgetModeler.py
index 28d8a6f..9b5bb33 100644
--- a/studio/widgetModeler.py
+++ b/studio/widgetModeler.py
@@ -418,8 +418,6 @@ class ImageReviewer_Controler:
def recognizeCurrentPage(self):
image_reviewer = self.__getCurrentReviewer()
- image_reviewer.selectable_boxes_area.clearAreas()
- image_reviewer.applyTextColors()
dialog = QueuedEventsProgressDialog(self.main_window.window)
item = AsyncItem(self.__performRecognitionForReviewer,
(image_reviewer,),
@@ -465,6 +463,8 @@ class ImageReviewer_Controler:
def __performRecognitionForReviewerFinishedCb(self, dialog, image_reviewer,
data_boxes, error):
+ image_reviewer.selectable_boxes_area.clearAreas()
+ image_reviewer.applyTextColors()
for data_box in data_boxes:
image_reviewer.addDataBox(data_box)
dialog.cancel()
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]