Skip to content

Commit

Permalink
Fix: Chord deletion
Browse files Browse the repository at this point in the history
Fixes #141
  • Loading branch information
Raymo111 committed Aug 29, 2024
1 parent fdfaa2b commit 0a5c0ae
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion nexus/GUI.py
Original file line number Diff line number Diff line change
Expand Up @@ -539,7 +539,7 @@ def delete_entry(self, is_chord=False):
"""Controller for right click menu/delete key delete entry"""
# Get word(s) from selected row(s)
table = self.chord_table if is_chord else self.chentry_table
selected_words = ([table.item(row.row(), 0).text() for row in table.selectionModel().selectedRows()]
selected_words = ({table.item(row.row(), 0).text(): None for row in table.selectionModel().selectedRows()}
if is_chord else {table.item(row.row(), 0).text(): CaseSensitivity.INSENSITIVE for row in
table.selectionModel().selectedRows()})
display_word = None
Expand Down
1 change: 1 addition & 0 deletions nexus/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -372,6 +372,7 @@ def _prompt_for_password(new: bool, desc: str = "") -> str:
print(f"Word '{word}' not found")
exit_code = 5
case "delchordentry": # Delete chord entry
logging.debug("args.chord: " + str(args.chord))
for chord in args.chord:
if not freqlog.delete_logged_chord(chord):
print(f"Chord '{chord}' not found")
Expand Down

0 comments on commit 0a5c0ae

Please sign in to comment.