Skip to content

Commit

Permalink
Merge pull request spyder-ide#22595 from ccordoba12/issue-22584
Browse files Browse the repository at this point in the history
PR: Dock all undocked plugins before applying a layout
  • Loading branch information
ccordoba12 authored Sep 29, 2024
2 parents 4308010 + 0f9bb04 commit d49103b
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions spyder/plugins/layout/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -374,6 +374,12 @@ def set_main_window_layout(self, main_window, dockable_plugins):
# Fixes spyder-ide/spyder#22494
plugin.set_conf('window_was_undocked_before_hiding', False)

# Dock all plugins that are undocked before applying the layout to
# avoid odd RuntimeError's.
# Fixes spyder-ide/spyder#22584
if plugin.get_widget().windowwidget is not None:
plugin.close_window()

# Hide all plugins
plugin.toggle_view(False)

Expand Down

0 comments on commit d49103b

Please sign in to comment.