Skip to content

Commit 518ca36

Browse files
committed
Move event handler for EVT_VIRTUAL_ENTER_LONG
to a more appropriate place. It now lives in the display state.
1 parent 968d5be commit 518ca36

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

src/SCRIPTS/BF/ui.lua

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -303,11 +303,6 @@ local function run_ui(event)
303303
invalidatePages()
304304
end
305305
end
306-
end
307-
if event == EVT_VIRTUAL_ENTER_LONG then
308-
popupMenuActive = 1
309-
killEnterBreak = 1
310-
pageState = pageStatus.popupMenu
311306
elseif pageState == pageStatus.popupMenu then
312307
if event == EVT_VIRTUAL_EXIT then
313308
pageState = pageStatus.display
@@ -323,7 +318,7 @@ local function run_ui(event)
323318
popupMenuList[popupMenuActive].f()
324319
end
325320
end
326-
elseif pageState <= pageStatus.display then
321+
elseif pageState == pageStatus.display then
327322
if event == EVT_VIRTUAL_PREV_PAGE then
328323
incPage(-1)
329324
killEvents(event) -- X10/T16 issue: pageUp is a long press
@@ -340,6 +335,10 @@ local function run_ui(event)
340335
pageState = pageStatus.editing
341336
end
342337
end
338+
elseif event == EVT_VIRTUAL_ENTER_LONG then
339+
popupMenuActive = 1
340+
killEnterBreak = 1
341+
pageState = pageStatus.popupMenu
343342
elseif event == EVT_VIRTUAL_EXIT then
344343
invalidatePages()
345344
currentField = 1

0 commit comments

Comments
 (0)