From c2f9116092ded439fef09f30dea17003f5c5ca31 Mon Sep 17 00:00:00 2001 From: Kubik Date: Thu, 7 Mar 2024 08:59:58 +0100 Subject: [PATCH] restore root node, when all tabs are removed --- src/dock_state/tree/mod.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/dock_state/tree/mod.rs b/src/dock_state/tree/mod.rs index 3bf861a..f8aed2a 100644 --- a/src/dock_state/tree/mod.rs +++ b/src/dock_state/tree/mod.rs @@ -589,6 +589,8 @@ impl Tree { let Some(parent) = node.parent() else { self.nodes.clear(); + let root = Node::leaf_with(vec![]); + self.nodes.push(root); return; };