summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--xmake/core/ui/panel.lua8
1 files changed, 6 insertions, 2 deletions
diff --git a/xmake/core/ui/panel.lua b/xmake/core/ui/panel.lua
index 011eed19a..f08bceade 100644
--- a/xmake/core/ui/panel.lua
+++ b/xmake/core/ui/panel.lua
@@ -144,7 +144,7 @@ function panel:insert(v, opt)
end
-- remove view
-function panel:remove(v)
+function panel:remove(v, opt)
-- check
assert(v:parent() == self)
@@ -158,7 +158,11 @@ function panel:remove(v)
-- select next view
if self:current() == v then
- self:select_next(nil, true)
+ if opt and opt.select_prev then
+ self:select_prev(nil, true)
+ else
+ self:select_next(nil, true)
+ end
end
-- invalidate it