Fix bug with lost primary node in rootview

It was possible to lose the primary node thus possibly preventing the
opening of new documents.
This commit is contained in:
Francesco Abbate 2020-12-15 13:30:49 +01:00
parent 499f085045
commit c3dd506bd7
1 changed files with 3 additions and 0 deletions

View File

@ -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