Skip to content

Commit

Permalink
Import dir images without error popup
Browse files Browse the repository at this point in the history
  • Loading branch information
wkentaro committed Mar 26, 2018
1 parent 66fd6bf commit ae087f6
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions labelme/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,6 @@ def __init__(self, filename=None, output=None, store_data=True,
# Application state.
self.image = QImage()
self.imagePath = None
self.filename = filename
self.labeling_once = output is not None
self.output = output
self._store_data = store_data
Expand All @@ -349,6 +348,11 @@ def __init__(self, filename=None, output=None, store_data=True,
self.zoom_level = 100
self.fit_window = False

if filename is not None and os.path.isdir(filename):
self.importDirImages(filename)
else:
self.filename = filename

# XXX: Could be completely declarative.
# Restore application settings.
self.settings = {}
Expand Down Expand Up @@ -383,10 +387,6 @@ def __init__(self, filename=None, output=None, store_data=True,
#if self.firstStart:
# QWhatsThis.enterWhatsThisMode()

# Open Dir if deafult file
if self.filename and os.path.isdir(self.filename):
self.openDirDialog(dirpath=self.filename)

## Support Functions ##

def noShapes(self):
Expand Down

0 comments on commit ae087f6

Please sign in to comment.