Skip to content

Commit

Permalink
fix shortcuts
Browse files Browse the repository at this point in the history
  • Loading branch information
impact27 committed Oct 13, 2021
1 parent fffca64 commit 64e10e9
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions spyder/plugins/profiler/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
from spyder.plugins.profiler.widgets.main_widget import ProfilerWidget
from spyder.api.shellconnect.mixins import ShellConnectMixin
from spyder.utils.qthelpers import MENU_SEPARATOR
from spyder.config.manager import CONF

# Localization
_ = get_translation('spyder')
Expand All @@ -28,8 +29,8 @@
# --- Constants
# ----------------------------------------------------------------------------
class ProfilerActions:
ProfileCurrentFile = 'profile_current_filename_action'
ProfileCurrentCell = 'profile_current_cell_action'
ProfileCurrentFile = 'profile file'
ProfileCurrentCell = 'profile cell'


# --- Plugin
Expand Down Expand Up @@ -94,6 +95,16 @@ def on_editor_available(self):
widget.sig_edit_goto_requested.connect(editor.load)
self.sig_profile_file.connect(editor.profile_file)
self.sig_profile_cell.connect(editor.profile_cell)
CONF.config_shortcut(
editor.profile_file,
context=self.CONF_SECTION,
name=ProfilerActions.ProfileCurrentFile,
parent=editor)
CONF.config_shortcut(
editor.profile_cell,
context=self.CONF_SECTION,
name=ProfilerActions.ProfileCurrentCell,
parent=editor)

@on_plugin_available(plugin=Plugins.Preferences)
def on_preferences_available(self):
Expand Down

0 comments on commit 64e10e9

Please sign in to comment.