diff options
| author | ruki <[email protected]> | 2017-12-22 22:35:14 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2017-12-22 09:31:26 +0800 |
| commit | 0f825ce5a225f7dfba8e46e44de82c50df0b2e35 (patch) | |
| tree | 2948fca0cc55a67a57ef10901a25a503828415f5 /xmake/core/ui/view.lua | |
| parent | 8594fdccd6cb87909a227f6ad0d794188bc11584 (diff) | |
improve cui refresh
Diffstat (limited to 'xmake/core/ui/view.lua')
| -rw-r--r-- | xmake/core/ui/view.lua | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/xmake/core/ui/view.lua b/xmake/core/ui/view.lua index adfcbe209..d7d09ddc2 100644 --- a/xmake/core/ui/view.lua +++ b/xmake/core/ui/view.lua @@ -22,11 +22,6 @@ -- @file view.lua -- ---[[ Console User Interface (cui) ]----------------------------------------- -Author: Tiago Dionizio (tiago.dionizio AT gmail.com) -$Id: view.lua 18 2007-06-21 20:43:52Z tngd $ ---------------------------------------------------------------------------]] - -- load modules local log = require("ui/log") local rect = require("ui/rect") @@ -218,10 +213,7 @@ end -- invalidate view to redraw it function view:invalidate() - - -- need redraw and refresh it self:_mark_redraw() - self:_mark_refresh() end -- on event (abstract) @@ -311,7 +303,9 @@ end function view:_mark_refresh() -- need refresh it - self:state_set("refresh", true) + if self:state("visible") then + self:state_set("refresh", true) + end -- need refresh it's parent view if self:parent() then |
