|
@@ -1032,7 +1032,9 @@ class MainWindow(QtWidgets.QMainWindow):
|
|
if shape is None:
|
|
if shape is None:
|
|
return
|
|
return
|
|
text, flags, group_id = self.labelDialog.popUp(
|
|
text, flags, group_id = self.labelDialog.popUp(
|
|
- text=shape.label, flags=shape.flags, group_id=shape.group_id,
|
|
|
|
|
|
+ text=shape.label,
|
|
|
|
+ flags=shape.flags,
|
|
|
|
+ group_id=shape.group_id,
|
|
)
|
|
)
|
|
if text is None:
|
|
if text is None:
|
|
return
|
|
return
|
|
@@ -1059,7 +1061,9 @@ class MainWindow(QtWidgets.QMainWindow):
|
|
|
|
|
|
def fileSearchChanged(self):
|
|
def fileSearchChanged(self):
|
|
self.importDirImages(
|
|
self.importDirImages(
|
|
- self.lastOpenDir, pattern=self.fileSearch.text(), load=False,
|
|
|
|
|
|
+ self.lastOpenDir,
|
|
|
|
+ pattern=self.fileSearch.text(),
|
|
|
|
+ load=False,
|
|
)
|
|
)
|
|
|
|
|
|
def fileSelectionChanged(self):
|
|
def fileSelectionChanged(self):
|
|
@@ -1165,7 +1169,9 @@ class MainWindow(QtWidgets.QMainWindow):
|
|
other_data = shape["other_data"]
|
|
other_data = shape["other_data"]
|
|
|
|
|
|
shape = Shape(
|
|
shape = Shape(
|
|
- label=label, shape_type=shape_type, group_id=group_id,
|
|
|
|
|
|
+ label=label,
|
|
|
|
+ shape_type=shape_type,
|
|
|
|
+ group_id=group_id,
|
|
)
|
|
)
|
|
for x, y in points:
|
|
for x, y in points:
|
|
shape.addPoint(QtCore.QPointF(x, y))
|
|
shape.addPoint(QtCore.QPointF(x, y))
|
|
@@ -1358,7 +1364,8 @@ class MainWindow(QtWidgets.QMainWindow):
|
|
self.scrollBars[Qt.Horizontal].value() + x_shift,
|
|
self.scrollBars[Qt.Horizontal].value() + x_shift,
|
|
)
|
|
)
|
|
self.setScroll(
|
|
self.setScroll(
|
|
- Qt.Vertical, self.scrollBars[Qt.Vertical].value() + y_shift,
|
|
|
|
|
|
+ Qt.Vertical,
|
|
|
|
+ self.scrollBars[Qt.Vertical].value() + y_shift,
|
|
)
|
|
)
|
|
|
|
|
|
def setFitWindow(self, value=True):
|
|
def setFitWindow(self, value=True):
|
|
@@ -1446,7 +1453,8 @@ class MainWindow(QtWidgets.QMainWindow):
|
|
return False
|
|
return False
|
|
self.imageData = self.labelFile.imageData
|
|
self.imageData = self.labelFile.imageData
|
|
self.imagePath = osp.join(
|
|
self.imagePath = osp.join(
|
|
- osp.dirname(label_file), self.labelFile.imagePath,
|
|
|
|
|
|
+ osp.dirname(label_file),
|
|
|
|
+ self.labelFile.imagePath,
|
|
)
|
|
)
|
|
self.otherData = self.labelFile.otherData
|
|
self.otherData = self.labelFile.otherData
|
|
else:
|
|
else:
|