diff --git a/CHANGELOG.md b/CHANGELOG.md index f8725ce..e03fb40 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,10 @@ This is an overview of major changes. Refer to the git repository for a full log change. +Version 0.1.27 +------------- +- Fixed #277 - Subsegment box broken +- Fixed #275 - Test image has executable bit set (@edwbaker) + Version 0.1.26 ------------- - Fixed #263 - Subsegment box should copy metadata to new boxes diff --git a/inselect/__init__.py b/inselect/__init__.py index 2064ee2..7327aa6 100644 --- a/inselect/__init__.py +++ b/inselect/__init__.py @@ -1,6 +1,6 @@ """Segmentation, validation and annotation of images of museum specimens """ -__version__ = '0.1.26' +__version__ = '0.1.27' # distutils/version.py and win32/lib/win32verstamp.py have different # restrictions on the format of version numbers - both must be met. # Three numbers separated by dots is a safe format. diff --git a/inselect/gui/plugins/subsegment.py b/inselect/gui/plugins/subsegment.py index b2b905a..66adaa1 100644 --- a/inselect/gui/plugins/subsegment.py +++ b/inselect/gui/plugins/subsegment.py @@ -76,7 +76,7 @@ def __call__(self, progress): # new rects and replace the existing item existing = items[row] new_items = [None] * len(rects) - for index, rect in enumerate(image.to_normalised(rects)): + for index, rect in enumerate(rects): new_items[index] = existing.copy() new_items[index]['rect'] = rect items[row:(1+row)] = new_items diff --git a/inselect/tests/gui/test_subsegment.py b/inselect/tests/gui/test_subsegment.py index 86fa46d..e68e459 100644 --- a/inselect/tests/gui/test_subsegment.py +++ b/inselect/tests/gui/test_subsegment.py @@ -4,10 +4,10 @@ from mock import patch from pathlib import Path -from PySide.QtCore import QPointF +from PySide.QtCore import QPointF, QRect from PySide.QtGui import QMessageBox -from inselect.gui.roles import MetadataRole +from inselect.gui.roles import MetadataRole, RectRole from gui_test import MainWindowTest @@ -44,10 +44,16 @@ def test_subsegment(self): self.assertEqual(3, w.model.rowCount()) self.assertEqual({'Genus': 'Morganucodon'}, w.model.data(w.model.index(0, 0), MetadataRole)) + self.assertEqual(QRect(11, 31, 502, 278), + w.model.data(w.model.index(0, 0), RectRole)) self.assertEqual({'Genus': 'Morganucodon'}, w.model.data(w.model.index(1, 0), MetadataRole)) + self.assertEqual(QRect(395, 157, 404, 253), + w.model.data(w.model.index(1, 0), RectRole)) self.assertEqual({'Genus': 'Morganucodon'}, w.model.data(w.model.index(2, 0), MetadataRole)) + self.assertEqual(QRect(18, 370, 510, 209), + w.model.data(w.model.index(2, 0), RectRole)) self.assertTrue(w.model.is_modified) # Close the document