[ocrfeeder] Fix the letter and line spacing persistency when selecting different areas
- From: Joaquim Manuel Pereira Rocha <jrocha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [ocrfeeder] Fix the letter and line spacing persistency when selecting different areas
- Date: Sat, 3 Dec 2011 13:36:42 +0000 (UTC)
commit 6010b853aee79936c2deca5abafedc5e5934d1e5
Author: Joaquim Rocha <jrocha igalia com>
Date: Sat Dec 3 13:48:02 2011 +0100
Fix the letter and line spacing persistency when selecting different areas
The areas' editor would maintain the last values of the letter and line
spacing that were set. These changes will make it show those values from
the data boxes.
src/ocrfeeder/studio/dataHolder.py | 6 ++++++
src/ocrfeeder/studio/widgetModeler.py | 2 ++
src/ocrfeeder/studio/widgetPresenter.py | 3 +++
3 files changed, 11 insertions(+), 0 deletions(-)
---
diff --git a/src/ocrfeeder/studio/dataHolder.py b/src/ocrfeeder/studio/dataHolder.py
index 05d07c9..82c89cd 100644
--- a/src/ocrfeeder/studio/dataHolder.py
+++ b/src/ocrfeeder/studio/dataHolder.py
@@ -150,6 +150,12 @@ class DataBox(gobject.GObject):
def setLineSpacing(self, spacing):
self.text_data.line_space = spacing
+ def getLetterSpacing(self):
+ return self.text_data.letter_space
+
+ def getLineSpacing(self):
+ return self.text_data.line_space
+
def getX(self):
return self.x
diff --git a/src/ocrfeeder/studio/widgetModeler.py b/src/ocrfeeder/studio/widgetModeler.py
index 5847d60..35c0935 100644
--- a/src/ocrfeeder/studio/widgetModeler.py
+++ b/src/ocrfeeder/studio/widgetModeler.py
@@ -1066,6 +1066,8 @@ class Editor:
self.box_editor.setType(self.data_box.type)
self.box_editor.setText(self.data_box.text)
self.box_editor.setFontSize(self.data_box.text_data.size)
+ self.box_editor.setLineSpacing(self.data_box.getLineSpacing())
+ self.box_editor.setLetterSpacing(self.data_box.getLetterSpacing())
self.__updating_data_box = False
self.__connectDataBoxSignals()
self.__updateBoxColor(None, self.data_box.type)
diff --git a/src/ocrfeeder/studio/widgetPresenter.py b/src/ocrfeeder/studio/widgetPresenter.py
index 836db42..279dee4 100644
--- a/src/ocrfeeder/studio/widgetPresenter.py
+++ b/src/ocrfeeder/studio/widgetPresenter.py
@@ -631,6 +631,9 @@ class BoxEditor(gtk.ScrolledWindow, gobject.GObject):
def setLineSpacing(self, spacing):
self.line_spacing_spin.set_value(spacing)
+ def setLetterSpacing(self, spacing):
+ self.letter_spacing_spin.set_value(spacing)
+
def setOcrEngines(self, engines_list):
self.ocr_combo_box.get_model().clear()
for engine in engines_list:
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]