Skip to content

Commit

Permalink
Merge pull request #22819 from ccordoba12/issue-22607
Browse files Browse the repository at this point in the history
PR: Fix enabled state of Run plugin actions when a file type doesn't have an associated configuration
  • Loading branch information
ccordoba12 authored Nov 3, 2024
2 parents 3db4320 + 8024932 commit 0e71cda
Show file tree
Hide file tree
Showing 2 changed files with 7 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
3 changes: 2 additions & 1 deletion spyder/widgets/mixins.py
Original file line number Diff line number Diff line change
Expand Up @@ -1455,7 +1455,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 Expand Up @@ -1503,6 +1503,7 @@ def _enter_array(self, inline):
cursor.endEditBlock()

# ---- Qt methods
# -------------------------------------------------------------------------
def mouseDoubleClickEvent(self, event):
"""Select NUMBER tokens to select numeric literals on double click."""
cursor = self.cursorForPosition(event.pos())
Expand Down

0 comments on commit 0e71cda

Please sign in to comment.