Skip to content

Commit

Permalink
bug fixes in shortcut selector
Browse files Browse the repository at this point in the history
  • Loading branch information
0ssamaak0 committed Aug 24, 2023
1 parent 69052a4 commit ca4152c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions DLTA_AI_app/labelme/widgets/shortcut_selector_UI.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ def on_shortcut_table_clicked(item):

# If the user clicks OK, update the shortcut and table
if dialog.exec():
key = key_edit.keySequence().toString(QtGui.QKeySequence.NativeText)
key = key_edit.keySequence().toString(QtGui.QKeySequence.SequenceFormat.NativeText)
if key in shortcuts.values() and list(shortcuts.keys())[list(shortcuts.values()).index(key)] != name:
conflicting_shortcut = list(shortcuts.keys())[list(shortcuts.values()).index(key)]
QtWidgets.QMessageBox.warning(None, "Error", f"{key} is already assigned to {conflicting_shortcut}.")
Expand Down Expand Up @@ -142,7 +142,7 @@ def on_restore_button_clicked():
dialog.setMinimumHeight(shortcut_table.rowHeight(0) * 10 + 50)

# Set the size policy to allow vertical resizing
dialog.setSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Expanding)
dialog.setSizePolicy(QtWidgets.QSizePolicy.Policy.Fixed, QtWidgets.QSizePolicy.Policy.Expanding)

# Display the dialog box
dialog.exec()
Expand Down

0 comments on commit ca4152c

Please sign in to comment.