Skip to content

Commit e34a1c9

Browse files
committed
Change call order in Option:OnCursor()
1 parent 108f20d commit e34a1c9

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

scripts/devtools/menu/option/option.lua

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -140,13 +140,13 @@ end
140140
--- Triggers when focused.
141141
-- @tparam menu.TextMenu textmenu
142142
function Option:OnCursor(textmenu)
143-
if self.data_sidebar then
144-
self.submenu:UpdateScreen(self.data_sidebar)
145-
end
146-
147143
if type(self.on_cursor_fn) == "function" or type(self.on_accept_fn) == "table" then
148144
self.on_cursor_fn(self, self.submenu, textmenu)
149145
end
146+
147+
if self.data_sidebar then
148+
self.submenu:UpdateScreen(self.data_sidebar)
149+
end
150150
end
151151

152152
--- Triggers when cancelled.

0 commit comments

Comments
 (0)