Fix issues and update version to 1.3.2
This commit is contained in:
parent
f55ef8ee8c
commit
7cf546b500
@ -1092,16 +1092,15 @@ class MainWindow(QMainWindow, WindowMixin):
|
||||
|
||||
def saveFile(self, _value=False):
|
||||
if self.defaultSaveDir is not None and len(ustr(self.defaultSaveDir)):
|
||||
# print('handle the image:' + self.filePath)
|
||||
if self.filePath:
|
||||
imgFileName = os.path.basename(self.filePath)
|
||||
savedFileName = os.path.splitext(imgFileName)[0] + LabelFile.suffix
|
||||
savedFileName = os.path.splitext(imgFileName)[0] + XML_EXT
|
||||
savedPath = os.path.join(ustr(self.defaultSaveDir), savedFileName)
|
||||
self._saveFile(savedPath)
|
||||
else:
|
||||
imgFileDir = os.path.dirname(self.filePath)
|
||||
imgFileName = os.path.basename(self.filePath)
|
||||
savedFileName = os.path.splitext(imgFileName)[0] + LabelFile.suffix
|
||||
savedFileName = os.path.splitext(imgFileName)[0] + XML_EXT
|
||||
savedPath = os.path.join(imgFileDir, savedFileName)
|
||||
self._saveFile(savedPath if self.labelFile
|
||||
else self.saveFileDialog())
|
||||
|
||||
@ -158,6 +158,8 @@ class PascalVocReader:
|
||||
bndbox = object_iter.find("bndbox")
|
||||
label = object_iter.find('name').text
|
||||
# Add chris
|
||||
difficult = False
|
||||
if object_iter.find('difficult') is not None:
|
||||
difficult = bool(int(object_iter.find('difficult').text))
|
||||
self.addShape(label, bndbox, difficult)
|
||||
return True
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
[bumpversion]
|
||||
current_version = 1.3.1
|
||||
current_version = 1.3.2
|
||||
commit = True
|
||||
tag = True
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user