From f6842b3377b8f2c656590568e3a3ea555f9906ec Mon Sep 17 00:00:00 2001 From: tzutalin Date: Sat, 21 Nov 2015 21:42:16 +0800 Subject: [PATCH] Fix unreferenced variable in openPrevImg --- labelImg.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/labelImg.py b/labelImg.py index a2d607e8..d202ba49 100755 --- a/labelImg.py +++ b/labelImg.py @@ -556,6 +556,7 @@ class MainWindow(QMainWindow, WindowMixin): points=[(p.x(), p.y()) for p in s.points]) shapes = [format_shape(shape) for shape in self.canvas.shapes] + # Can add differrent annotation formats here try: if self.usingPascalVocFormat is True: print 'savePascalVocFormat save to:' + filename @@ -830,9 +831,9 @@ class MainWindow(QMainWindow, WindowMixin): currIndex = self.mImgList.index(self.filename) if currIndex -1 >= 0: filename = self.mImgList[currIndex-1] + if filename: + self.loadFile(filename) - if filename: - self.loadFile(filename) def openNextImg(self, _value=False):