Skip to content

Commit

Permalink
Backport PR spyder-ide#22819: PR: Fix enabled state of Run plugin act…
Browse files Browse the repository at this point in the history
…ions when a file type doesn't have an associated configuration
  • Loading branch information
ccordoba12 committed Nov 3, 2024
1 parent b543658 commit 1b35518
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion spyder/plugins/run/container.py
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,11 @@ def currently_selected_configuration(self):

def switch_focused_run_configuration(self, uuid: Optional[str]):
uuid = uuid or None
if uuid == self.currently_selected_configuration:

# We need the first check to correctly update the run and context
# actions when the config is None.
# Fixes spyder-ide/spyder#22607
if uuid is not None and uuid == self.currently_selected_configuration:
return

self.metadata_model.set_current_run_configuration(uuid)
Expand Down
2 changes: 1 addition & 1 deletion spyder/widgets/mixins.py
Original file line number Diff line number Diff line change
Expand Up @@ -1452,7 +1452,7 @@ def get_match_number(self, pattern, case=False, regexp=False, word=False):
word=word)
return match_number

# ---- Array builder helper / See 'spyder/widgets/arraybuilder.py'
# ---- Array builder helper methods
# -------------------------------------------------------------------------
def enter_array_inline(self):
"""Enter array builder inline mode."""
Expand Down

0 comments on commit 1b35518

Please sign in to comment.