Skip to content

Commit

Permalink
bug fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
0ssamaak0 committed Jul 18, 2023
1 parent e915ceb commit 0e57d0d
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 13 deletions.
8 changes: 4 additions & 4 deletions DLTA_AI_app/labelme/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -1576,8 +1576,8 @@ def interpolateMENU(self, item=None):
mb = QtWidgets.QMessageBox
msg = self.tr("Interpolate all IDs?\n")
answer = mb.warning(self, self.tr(
"Attention"), msg, mb.Yes | mb.No)
if answer != mb.Yes:
"Attention"), msg, mb.StandardButton.Yes | mb.StandardButton.No)
if answer != mb.StandardButton.Yes:
return
else:
self.update_current_frame_annotation()
Expand Down Expand Up @@ -2899,8 +2899,8 @@ def deleteFile(self):
"You are about to permanently delete this label file, "
"proceed anyway?"
)
answer = mb.warning(self, self.tr("Attention"), msg, mb.Yes | mb.No)
if answer != mb.Yes:
answer = mb.warning(self, self.tr("Attention"), msg, mb.StandardButton.Yes | mb.StandardButton.No)
if answer != mb.StandardButton.Yes:
return

label_file = self.getLabelFile()
Expand Down
6 changes: 3 additions & 3 deletions DLTA_AI_app/labelme/utils/vid_to_frames.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ def __init__(self, mute = None, notification = None):
self.sampling_slider.setEnabled(False)
self.sampling_slider.valueChanged.connect(self.update_sampling_rate)
self.sampling_edit = QLineEdit(str(self.sampling_slider.value()))
self.sampling_edit.setFont(QFont('Arial', 5))
self.sampling_edit.setFont(QFont('Arial', 10))
self.sampling_edit.setAlignment(Qt.AlignmentFlag.AlignCenter)
self.sampling_edit.setEnabled(False)
self.sampling_edit.textChanged.connect(self.update_sampling_slider)
Expand All @@ -62,7 +62,7 @@ def __init__(self, mute = None, notification = None):
self.start_slider.setEnabled(False)
self.start_slider.valueChanged.connect(self.update_start_frame)
self.start_edit = QLineEdit(str(self.start_slider.value()))
self.start_edit.setFont(QFont('Arial', 5))
self.start_edit.setFont(QFont('Arial', 10))
self.start_edit.setAlignment(Qt.AlignmentFlag.AlignCenter)
self.start_edit.setEnabled(False)
self.start_edit.textChanged.connect(self.update_start_slider)
Expand All @@ -78,7 +78,7 @@ def __init__(self, mute = None, notification = None):
self.end_slider.setEnabled(False)
self.end_slider.valueChanged.connect(self.update_end_frame)
self.end_edit = QLineEdit(str(self.end_slider.value()))
self.end_edit.setFont(QFont('Arial', 5))
self.end_edit.setFont(QFont('Arial', 10))
self.end_edit.setAlignment(Qt.AlignmentFlag.AlignCenter)
self.end_edit.setEnabled(False)
self.end_edit.textChanged.connect(self.update_end_slider)
Expand Down
2 changes: 2 additions & 0 deletions DLTA_AI_app/labelme/widgets/canvas.py
Original file line number Diff line number Diff line change
Expand Up @@ -558,6 +558,8 @@ def boundedMoveVertex(self, pos):
point = shape[index]
if self.outOfPixmap(pos):
pos = self.intersectionPoint(point, pos)
# convert pos to QPointF
pos = QtCore.QPointF(pos)
shape.moveVertexBy(index, pos - point)

def boundedMoveShapes(self, shapes, pos):
Expand Down
4 changes: 2 additions & 2 deletions DLTA_AI_app/labelme/widgets/check_updates_UI.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,8 @@ def PopUp():
msgBox.button(QMessageBox.StandardButton.Yes).clicked.connect(lambda: open_release(tag["href"]))

# Add a close button to the message box
msgBox.addButton(QMessageBox.Close)
msgBox.button(QMessageBox.Close).setText("Close")
msgBox.addButton(QMessageBox.StandardButton.Close)
msgBox.button(QMessageBox.StandardButton.Close).setText("Close")

# Display the message box
msgBox.exec()
4 changes: 2 additions & 2 deletions DLTA_AI_app/labelme/widgets/feedback_UI.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ def PopUp():
msgBox.button(QMessageBox.StandardButton.Yes).clicked.connect(open_issue)

# Add a close button
msgBox.addButton(QMessageBox.Close)
msgBox.button(QMessageBox.Close).setText("Close")
msgBox.addButton(QMessageBox.StandardButton.Close)
msgBox.button(QMessageBox.StandardButton.Close).setText("Close")

# Display the feedback dialog box
msgBox.exec()
4 changes: 2 additions & 2 deletions DLTA_AI_app/labelme/widgets/preferences_UI.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,11 @@ def PopUp():

# Create the labels
themeLabel = QtWidgets.QLabel("Theme Settings 🌓")
themeLabel.setFont(QtGui.QFont("Arial", 10, QtGui.QFont.Bold))
themeLabel.setFont(QtGui.QFont("Arial", 10, QtGui.QFont.Weight.Bold))
theme_note_label = QtWidgets.QLabel("Requires app restart to take effect")

notificationLabel = QtWidgets.QLabel("Notifications Settings 🔔")
notificationLabel.setFont(QtGui.QFont("Arial", 10, QtGui.QFont.Bold))
notificationLabel.setFont(QtGui.QFont("Arial", 10, QtGui.QFont.Weight.Bold))
notification_note_label = QtWidgets.QLabel("Notifications works only for long tasks and if the app isn't focused")

# Load the current theme from the config file
Expand Down

0 comments on commit 0e57d0d

Please sign in to comment.