Skip to content

Commit

Permalink
Backport PR #22595 on branch 6.x (PR: Dock all undocked plugins befor…
Browse files Browse the repository at this point in the history
…e applying a layout) (#22610)

Co-authored-by: Carlos Cordoba <[email protected]>
  • Loading branch information
meeseeksmachine and ccordoba12 authored Sep 29, 2024
1 parent bfe5dc3 commit 8dbcfb1
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 8dbcfb1

Please sign in to comment.