From aa237f34a15f13c7be7f85f997869ecdadd98c07 Mon Sep 17 00:00:00 2001 From: "M. H. Beals" Date: Tue, 15 Oct 2019 13:17:13 +0100 Subject: [PATCH] v.0.3.8: Text Selection Bug (Issue #18) --- README.md | 4 ++-- changelog.md | 4 ++-- nisaba/__main__.py | 2 +- nisaba/database_display.py | 4 +++- setup.py | 2 +- 5 files changed, 9 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index be32401..b43600e 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,10 @@ -# Nisaba 0.3.7.1 +# Nisaba 0.3.8 A tool for multi-modal annotation ## Most Recent Update -+ Fixed "Missing Description when no page number" bug ++ Fixed basic text selection bug when selection last word (Issue #18) [Full Change Log](https://github.com/mhbeals/nisaba/blob/master/changelog.md) and [Development Roadmap](https://github.com/mhbeals/nisaba/blob/master/roadmap.md) diff --git a/changelog.md b/changelog.md index 0f55ebc..69d62f6 100644 --- a/changelog.md +++ b/changelog.md @@ -1,8 +1,8 @@ # Change Log -## Nisaba 0.3.7.1 +## Nisaba 0.3.8 -+ Fixed "Missing Description when no page number" bug ++ Fixed basic text selection bug when selection last word (Issue #18) ## Nisaba 0.3.7 diff --git a/nisaba/__main__.py b/nisaba/__main__.py index e7c759c..572cfa0 100644 --- a/nisaba/__main__.py +++ b/nisaba/__main__.py @@ -62,7 +62,7 @@ def option_switcher(switch): # Setup Taxonomy Window main_window = Tk() - main_window.title('Nisaba: Multi-Modal Annotation .1') + main_window.title('Nisaba: Multi-Modal Annotation v.0.3.8') # Place Icon # "Writing" by IQON from the Noun Project diff --git a/nisaba/database_display.py b/nisaba/database_display.py index 00bf6ad..c1b85c2 100644 --- a/nisaba/database_display.py +++ b/nisaba/database_display.py @@ -557,9 +557,11 @@ def segment_panels_displayer(self): # Create Segmentation Binder def text_selector(event): - + try: selection_index = self.database[self.collection_index]['items'][self.item_index]['transcription'][0].find(self.transcription_text.selection_get()) + if selection_index == -1: + selection_index = self.database[self.collection_index]['items'][self.item_index]['transcription'][0].find(self.transcription_text.selection_get()[:-1]) except(TclError): pass else: diff --git a/setup.py b/setup.py index d20fc0d..ebb0d86 100644 --- a/setup.py +++ b/setup.py @@ -8,7 +8,7 @@ README = (HERE / "README.md").read_text() # The nisaba version -nisaba_version = "0.3.7.1" +nisaba_version = "0.3.8" # This call to setup() does all the work setup(