[ocrfeeder] Force values >= 0 for the DataHolder.Box's x and y
- From: Joaquim Manuel Pereira Rocha <jrocha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [ocrfeeder] Force values >= 0 for the DataHolder.Box's x and y
- Date: Mon, 22 Dec 2014 00:13:08 +0000 (UTC)
commit f17db25d4602361284993be6c68735530f8a5469
Author: Joaquim Rocha <me joaquimrocha com>
Date: Sun Dec 21 23:59:54 2014 +0000
Force values >= 0 for the DataHolder.Box's x and y
src/ocrfeeder/studio/dataHolder.py | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/src/ocrfeeder/studio/dataHolder.py b/src/ocrfeeder/studio/dataHolder.py
index 3a0c6a5..2821960 100644
--- a/src/ocrfeeder/studio/dataHolder.py
+++ b/src/ocrfeeder/studio/dataHolder.py
@@ -87,11 +87,11 @@ class DataBox(GObject.GObject):
self.text_data = TextData(face, size, justification, line_space, letter_space)
def setX(self, new_x):
- self.x = new_x
+ self.x = max(0, new_x)
self.emit('changed_x', self.x)
def setY(self, new_y):
- self.y = new_y
+ self.y = max(0, new_y)
self.emit('changed_y', self.y)
def setWidth(self, new_width):
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]