Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PICARD-1220: Add keyboard shortcut to delete scripts. #875

Merged
merged 1 commit into from Mar 11, 2018
Merged

PICARD-1220: Add keyboard shortcut to delete scripts. #875

merged 1 commit into from Mar 11, 2018

Conversation

vishichoudhary
Copy link
Contributor

Summary

  • This is a…
    • Bug fix
    • Feature addition
    • Refactoring
    • Minor / simple change (like a typo)
    • Other
  • Describe this change in 1-2 sentences:

Problem

Solution

In options > Scripting. On pressing delete key, the script will be removed.

Action

@vishichoudhary
Copy link
Contributor Author

previous discussion can be found on #874

@@ -232,6 +232,14 @@ def __init__(self, parent=None):
self.last_selected_script_pos = 0
self.ui.splitter.setStretchFactor(0, 1)
self.ui.splitter.setStretchFactor(1, 2)
self.shortcut = QtWidgets.QShortcut(self.ui.script_list)
self.shortcut.setKey(QtGui.QKeySequence.Delete)
self.shortcut.activated.connect(self.script_remove_processor)
Copy link
Collaborator

@samj1912 samj1912 Mar 10, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rename this to self.delete_selected_script

@samj1912 samj1912 requested a review from zas March 10, 2018 19:05
@@ -232,6 +232,14 @@ def __init__(self, parent=None):
self.last_selected_script_pos = 0
self.ui.splitter.setStretchFactor(0, 1)
self.ui.splitter.setStretchFactor(1, 2)
self.delete_selected_script = QtWidgets.QShortcut(self.ui.script_list)
self.delete_selected_script.setKey(QtGui.QKeySequence.Delete)
self.delete_selected_script.activated.connect(self.script_remove_processor)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@vishichoudhary I meant the connected function. The shortcut variable itself could be self.delete_shortcut.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't say this but. naming the variables to seem most difficult task for me. :-( 😅

Add keyboard shortcut to delete scripts

Add keyboard shortcut to delete scripts
@samj1912 samj1912 merged commit deee1d0 into metabrainz:master Mar 11, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants