Skip to content

Commit

Permalink
Layout: Tabify any plugin that was not available in the previous session
Browse files Browse the repository at this point in the history
Also, give focus to the Variable Explorer if Help is not available the
first time Spyder starts.
  • Loading branch information
ccordoba12 committed Jul 25, 2024
1 parent 90b2b1a commit 073a22e
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions spyder/plugins/layout/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -993,8 +993,12 @@ def restore_visible_plugins(self):

# This should only be necessary the first time this method is run
if not visible_plugins:
visible_plugins = [Plugins.IPythonConsole, Plugins.Help,
Plugins.Editor]
visible_plugins = [
Plugins.IPythonConsole,
Plugins.Help,
Plugins.VariableExplorer, # In case Help is not available
Plugins.Editor,
]

# Restore visible plugins
for plugin in visible_plugins:
Expand Down Expand Up @@ -1151,10 +1155,9 @@ def tabify_new_plugins(self):
if plugin:
self.tabify_plugin(plugin, Plugins.Console)

# Tabify new external plugins
# Tabify any new plugin that was not available in the previous session.
# This can include internal plugins that were automatically disabled
# in the first session (e.g. due to the lack of WebEngine).
for plugin in self.get_dockable_plugins():
if (
plugin.NAME in PLUGIN_REGISTRY.external_plugins
and plugin.get_conf('first_time', True)
):
if plugin.get_conf('first_time', True):
self.tabify_plugin(plugin, Plugins.Console)

0 comments on commit 073a22e

Please sign in to comment.