Skip to content

Commit

Permalink
Merge pull request #22199 from hmaarrfk/5.x_backport_of_layout_fixes
Browse files Browse the repository at this point in the history
PR: Fix error when plugins required for tabification are unavailable (Layout)
  • Loading branch information
ccordoba12 authored Jul 9, 2024
2 parents e20ca36 + 1f9f1c6 commit c295479
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 5 deletions.
2 changes: 1 addition & 1 deletion spyder/plugins/breakpoints/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ class Breakpoints(SpyderDockablePlugin):
NAME = 'breakpoints'
REQUIRES = [Plugins.Editor]
OPTIONAL = [Plugins.MainMenu]
TABIFY = [Plugins.Help]
TABIFY = [Plugins.VariableExplorer, Plugins.Help]
WIDGET_CLASS = BreakpointWidget
CONF_SECTION = NAME
CONF_FILE = False
Expand Down
9 changes: 8 additions & 1 deletion spyder/plugins/layout/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -1058,7 +1058,14 @@ def tabify_helper(plugin, next_to_plugins):
return False

# Get the actual plugins from their names
next_to_plugins = [self.get_plugin(p) for p in next_to_plugins]
next_to_plugins = [
self.get_plugin(p, error=False) for p in next_to_plugins
]

# Remove not available plugins from next_to_plugins
next_to_plugins = [
p for p in next_to_plugins if p is not None
]

if plugin.get_conf('first_time', True):
# This tabifies external and internal plugins that are loaded for
Expand Down
2 changes: 1 addition & 1 deletion spyder/plugins/onlinehelp/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class OnlineHelp(SpyderDockablePlugin):
"""

NAME = 'onlinehelp'
TABIFY = Plugins.Help
TABIFY = [Plugins.VariableExplorer, Plugins.Help]
CONF_SECTION = NAME
CONF_FILE = False
WIDGET_CLASS = PydocBrowser
Expand Down
2 changes: 1 addition & 1 deletion spyder/plugins/profiler/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ class Profiler(SpyderDockablePlugin):
NAME = 'profiler'
REQUIRES = [Plugins.Preferences, Plugins.Editor]
OPTIONAL = [Plugins.MainMenu]
TABIFY = [Plugins.Help]
TABIFY = [Plugins.VariableExplorer, Plugins.Help]
WIDGET_CLASS = ProfilerWidget
CONF_SECTION = NAME
CONF_WIDGET_CLASS = ProfilerConfigPage
Expand Down
2 changes: 1 addition & 1 deletion spyder/plugins/pylint/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ class Pylint(SpyderDockablePlugin):
CONF_WIDGET_CLASS = PylintConfigPage
REQUIRES = [Plugins.Preferences, Plugins.Editor]
OPTIONAL = [Plugins.MainMenu, Plugins.Projects]
TABIFY = [Plugins.Help]
TABIFY = [Plugins.VariableExplorer, Plugins.Help]
CONF_FILE = False
DISABLE_ACTIONS_WHEN_HIDDEN = False

Expand Down

0 comments on commit c295479

Please sign in to comment.