Fix welcome tab not restored in empty panes

When restoring session, panes that only had a welcome tab were left
empty because welcome tabs weren't saved. Now add a welcome tab to
any pane that ends up empty after restore.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
rob 2026-01-06 02:09:26 -04:00
parent cb173a4b42
commit bb7c665d03
1 changed files with 3 additions and 0 deletions

View File

@ -601,6 +601,9 @@ class WorkspaceManager(QWidget):
if widget_type == "pane": if widget_type == "pane":
pane = self._create_pane() pane = self._create_pane()
pane.restore_tabs(data.get("state", {})) pane.restore_tabs(data.get("state", {}))
# If pane is empty after restore, add welcome tab
if pane.tab_count() == 0:
pane.add_welcome_tab()
return pane return pane
elif widget_type == "splitter": elif widget_type == "splitter":