summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorruki <[email protected]>2018-01-23 22:36:59 +0800
committerruki <[email protected]>2018-01-23 09:42:00 +0800
commitb10e053feb5d657b9c76b50b5907480edf637163 (patch)
tree1cb24ec6935bb961c90b8b4c75a2bf1b921d22c3
parent478adaf9c00557eb14fee23a024a192e572e1f2e (diff)
load menu config on idle event
-rw-r--r--xmake/core/ui/mconfdialog.lua12
1 files changed, 9 insertions, 3 deletions
diff --git a/xmake/core/ui/mconfdialog.lua b/xmake/core/ui/mconfdialog.lua
index dd12398fa..aa42c75c3 100644
--- a/xmake/core/ui/mconfdialog.lua
+++ b/xmake/core/ui/mconfdialog.lua
@@ -56,9 +56,6 @@ Pressing <Y> includes, <N> excludes. Enter <Esc> to go back or exit, <?> for Hel
-- insert menu config
self:box():panel():insert(self:menuconf())
-
- -- load config first
- self:action_on(action.ac_on_load)
end
-- get menu config
@@ -71,6 +68,15 @@ end
-- on event
function mconfdialog:event_on(e)
+
+ -- load config first
+ if e.type == event.ev_idle then
+ if not self._LOADED then
+ self:action_on(action.ac_on_load)
+ self._LOADED = true
+ end
+ end
+
-- TODO
return boxdialog.event_on(self, e)
end