diff options
| author | ruki <[email protected]> | 2018-01-19 22:47:14 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2018-01-19 10:43:24 +0800 |
| commit | 2e300a17250c2e391cd36d5743b806877982eaf2 (patch) | |
| tree | 50a2ff493734fd03763f53eb9fbeafa06cded5e2 | |
| parent | 41ad9ed26eec93d72782a6db633124b754fd2258 (diff) | |
fix refresh bug
| -rw-r--r-- | tests/ui/dialog.lua | 4 | ||||
| -rw-r--r-- | xmake/core/ui/panel.lua | 2 | ||||
| -rw-r--r-- | xmake/core/ui/view.lua | 2 |
3 files changed, 3 insertions, 5 deletions
diff --git a/tests/ui/dialog.lua b/tests/ui/dialog.lua index 9e4d601c1..827ca1385 100644 --- a/tests/ui/dialog.lua +++ b/tests/ui/dialog.lua @@ -77,9 +77,7 @@ function demo:init() dialog_input:show(false) end) self:insert(dialog_input, {centerx = true, centery = true}) - - -- TODO --- dialog_input:show(false) + dialog_input:show(false) end -- main entry diff --git a/xmake/core/ui/panel.lua b/xmake/core/ui/panel.lua index 8cacefc90..fac72a2ab 100644 --- a/xmake/core/ui/panel.lua +++ b/xmake/core/ui/panel.lua @@ -321,7 +321,7 @@ end function panel:refresh() -- need not refresh? do not refresh it - if not self:state("refresh") then + if not self:state("refresh") or not self:state("visible") then return end diff --git a/xmake/core/ui/view.lua b/xmake/core/ui/view.lua index 471a42b60..8c3cabaee 100644 --- a/xmake/core/ui/view.lua +++ b/xmake/core/ui/view.lua @@ -193,7 +193,7 @@ function view:refresh() -- refresh to the parent view local parent = self:parent() - if parent then + if parent and self:state("visible") then -- clip bounds with the parent view local bounds = self:bounds() |
