summaryrefslogtreecommitdiff
path: root/xmake/core/ui/group.lua
diff options
context:
space:
mode:
authorruki <[email protected]>2017-12-19 22:38:24 +0800
committerruki <[email protected]>2017-12-19 09:50:27 +0800
commit5924ef4adbe4b084c465bc9604254be60d147074 (patch)
tree93c00311a46d3ac7034b775ba4fa6b69212bff9f /xmake/core/ui/group.lua
parentb061bd17789d582771c77778e17a4f5576e1a01f (diff)
remove some redraw ops
Diffstat (limited to 'xmake/core/ui/group.lua')
-rw-r--r--xmake/core/ui/group.lua11
1 files changed, 9 insertions, 2 deletions
diff --git a/xmake/core/ui/group.lua b/xmake/core/ui/group.lua
index b9846c731..a088ef7af 100644
--- a/xmake/core/ui/group.lua
+++ b/xmake/core/ui/group.lua
@@ -28,6 +28,7 @@ $Id: group.lua 18 2007-06-21 20:43:52Z tngd $
--------------------------------------------------------------------------]]
-- load modules
+local log = require("ui/log")
local view = require("ui/view")
local rect = require("ui/rect")
local event = require("ui/event")
@@ -133,8 +134,7 @@ function group:insert(v)
self:select(v)
end
- -- draw and show this view
- v:draw()
+ -- show this view
v:show(true)
-- unlock
@@ -252,6 +252,9 @@ function group:execute()
-- show this group
self:show(true)
+ -- refresh first
+ self:refresh()
+
-- do message loop
local e = nil
local sleep = true
@@ -300,7 +303,11 @@ function group:redraw(on_parent)
-- redraw all child views
for v in self:views() do
if v:state("visible") then
+
+ -- cause groups to redraw
v:redraw(false)
+
+ -- draw this child view
self:_draw_child(v)
end
end