diff options
| author | ruki <[email protected]> | 2018-02-03 17:30:06 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2018-02-03 17:30:06 +0800 |
| commit | e2fa783bbb4f2b2eaa45b6c57dea664982b53931 (patch) | |
| tree | aa04e5430bab079c15756013cd1ddb3e2bfda5fc /xmake/core | |
| parent | 59c54d54023e4bf9f47095dada02497747f5e0a7 (diff) | |
fix show result dialog in mconfdialog
Diffstat (limited to 'xmake/core')
| -rw-r--r-- | xmake/core/ui/mconfdialog.lua | 6 | ||||
| -rw-r--r-- | xmake/core/ui/panel.lua | 2 |
2 files changed, 6 insertions, 2 deletions
diff --git a/xmake/core/ui/mconfdialog.lua b/xmake/core/ui/mconfdialog.lua index fdd82565d..819b0745e 100644 --- a/xmake/core/ui/mconfdialog.lua +++ b/xmake/core/ui/mconfdialog.lua @@ -283,7 +283,11 @@ end function mconfdialog:show_result(text) local dialog_result = self:resultdialog() dialog_result:text():text_set(text) - self:insert(dialog_result, {centerx = true, centery = true}) + if not self:view("mconfdialog.result") then + self:insert(dialog_result, {centerx = true, centery = true}) + else + self:select(dialog_result) + end end -- on event diff --git a/xmake/core/ui/panel.lua b/xmake/core/ui/panel.lua index 2cc092664..b403f339d 100644 --- a/xmake/core/ui/panel.lua +++ b/xmake/core/ui/panel.lua @@ -98,7 +98,7 @@ function panel:insert(v, opt) -- check assert(not v:parent() or v:parent() == self) - assert(not self:view(v:name()), "%s has been in this panel!", v) + assert(not self:view(v:name()), v:name() .. " has been in this panel!") -- this view has been inserted into this panel? remove it first if v:parent() == self then |
