From 4f84f68b9642229afa8a8cf5e99617e12ebc24fd Mon Sep 17 00:00:00 2001 From: vdalv Date: Sat, 23 Jun 2018 01:14:30 -0700 Subject: [PATCH] Fix issue #287 and a typo --- labelImg.py | 5 ++++- libs/constants.py | 4 ++-- 2 files changed, 6 insertions(+), 3 deletions(-) mode change 100644 => 100755 libs/constants.py diff --git a/labelImg.py b/labelImg.py index 8515509d..8e83a2fe 100755 --- a/labelImg.py +++ b/labelImg.py @@ -1190,7 +1190,10 @@ class MainWindow(QMainWindow, WindowMixin): # If the labelling file does not exist yet, create if and # re-save it with the verified attribute. self.saveFile() - self.labelFile.toggleVerify() + if self.labelFile != None: + self.labelFile.toggleVerify() + else: + return self.canvas.verified = self.labelFile.verified self.paintCanvas() diff --git a/libs/constants.py b/libs/constants.py old mode 100644 new mode 100755 index fc749aa5..7e12d682 --- a/libs/constants.py +++ b/libs/constants.py @@ -12,5 +12,5 @@ SETTING_PAINT_LABEL = 'paintlabel' SETTING_LAST_OPEN_DIR = 'lastOpenDir' SETTING_AUTO_SAVE = 'autosave' SETTING_SINGLE_CLASS = 'singleclass' -FORMAT_PASCALVOC='PscalVOC' -FORMAT_YOLO='YOLO' \ No newline at end of file +FORMAT_PASCALVOC='PascalVOC' +FORMAT_YOLO='YOLO'