summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--xmake/core/ui/choicebox.lua3
-rw-r--r--xmake/core/ui/menuconf.lua3
2 files changed, 6 insertions, 0 deletions
diff --git a/xmake/core/ui/choicebox.lua b/xmake/core/ui/choicebox.lua
index da39dc00c..72964e4d0 100644
--- a/xmake/core/ui/choicebox.lua
+++ b/xmake/core/ui/choicebox.lua
@@ -51,6 +51,9 @@ function choicebox:load(values, selected)
-- clear the views first
self:clear()
+ -- reset start index
+ self._STARTINDEX = 1
+
-- load items
local items = {}
for idx, value in ipairs(values) do
diff --git a/xmake/core/ui/menuconf.lua b/xmake/core/ui/menuconf.lua
index a2fe86d25..05e7a65f0 100644
--- a/xmake/core/ui/menuconf.lua
+++ b/xmake/core/ui/menuconf.lua
@@ -54,6 +54,9 @@ function menuconf:load(configs)
-- clear the views first
self:clear()
+ -- reset start index
+ self._STARTINDEX = 1
+
-- detach the previous config and view
local configs_prev = self._CONFIGS._PREV
if configs_prev then