From c3dd506bd7782376cde928bee14f188a2b00ea48 Mon Sep 17 00:00:00 2001 From: Francesco Abbate Date: Tue, 15 Dec 2020 13:30:49 +0100 Subject: [PATCH] Fix bug with lost primary node in rootview It was possible to lose the primary node thus possibly preventing the opening of new documents. --- data/core/rootview.lua | 3 +++ 1 file changed, 3 insertions(+) diff --git a/data/core/rootview.lua b/data/core/rootview.lua index 31fc162c..2c6ee7fa 100644 --- a/data/core/rootview.lua +++ b/data/core/rootview.lua @@ -131,6 +131,9 @@ function Node:close_active_view(root) p = p[is_a and "a" or "b"] end p:set_active_view(p.active_view) + if self.is_primary_node then + p.is_primary_node = true + end end end core.last_active_view = nil