From c6e9d0af515d7ba4f912255a62707d5952279ed7 Mon Sep 17 00:00:00 2001 From: Carlos Cordoba Date: Sat, 2 Nov 2024 12:15:58 -0500 Subject: [PATCH 1/2] Widgets: Improve block comments in BaseEditMixin --- spyder/widgets/mixins.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/spyder/widgets/mixins.py b/spyder/widgets/mixins.py index f3f1152bb31..87158752060 100644 --- a/spyder/widgets/mixins.py +++ b/spyder/widgets/mixins.py @@ -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.""" @@ -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()) From 8024932c80fc5ad59644aaf7146dd56238d7ba03 Mon Sep 17 00:00:00 2001 From: Carlos Cordoba Date: Sat, 2 Nov 2024 12:53:05 -0500 Subject: [PATCH 2/2] Run: Fix enabled state of its actions when run config is None --- spyder/plugins/run/container.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/spyder/plugins/run/container.py b/spyder/plugins/run/container.py index cc5f643f3ca..a2929b9ce37 100644 --- a/spyder/plugins/run/container.py +++ b/spyder/plugins/run/container.py @@ -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)