From b10e053feb5d657b9c76b50b5907480edf637163 Mon Sep 17 00:00:00 2001 From: ruki Date: Tue, 23 Jan 2018 22:36:59 +0800 Subject: load menu config on idle event --- xmake/core/ui/mconfdialog.lua | 12 +++++++++--- 1 file 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 includes, excludes. Enter 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 -- cgit v1.3.1