diff options
| author | ruki <[email protected]> | 2020-12-01 00:30:38 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2020-12-01 00:30:38 +0800 |
| commit | 1817f0de4ed1df310b649c8544851d79cc8e4101 (patch) | |
| tree | c594424b411f716c70a6457e6b88095da74293ac | |
| parent | 8e77f2f4a8a411b695eba93fb297a24635531c65 (diff) | |
fix back after scrolling
| -rw-r--r-- | xmake/core/ui/choicebox.lua | 3 | ||||
| -rw-r--r-- | xmake/core/ui/menuconf.lua | 3 |
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 |
