Fix checking if sibling is locked when removing `View`s

We only checked if sibling was locked in the `x` direction.
This commit is contained in:
Guldoman 2021-09-14 04:16:46 +02:00 committed by Francesco
parent 25744d93ce
commit 1e8031a0e8
1 changed files with 2 additions and 1 deletions

View File

@ -142,7 +142,8 @@ function Node:remove_view(root, view)
local parent = self:get_parent_node(root)
local is_a = (parent.a == self)
local other = parent[is_a and "b" or "a"]
if other:get_locked_size() then
local locked_size_x, locked_size_y = other:get_locked_size()
if locked_size_x or locked_size_y then
self.views = {}
self:add_view(EmptyView())
else