Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix DOUBLE_CLICK_MS reference #4996

Merged
merged 1 commit into from
Oct 9, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions library/lua/gui/widgets/list.lua
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ local common = require('gui.widgets.common')
local Widget = require('gui.widgets.widget')
local Scrollbar = require('gui.widgets.scrollbar')
local Label = require('gui.widgets.labels.label')
local Panel = require('gui.widgets.containers.panel')

local getval = utils.getval
local to_pen = dfhack.pen.parse
Expand Down Expand Up @@ -341,7 +340,7 @@ function List:onInput(keys)
if idx ~= self:getSelected() then
self.last_select_click_ms = now_ms
else
if now_ms - self.last_select_click_ms <= Panel.DOUBLE_CLICK_MS then
if now_ms - self.last_select_click_ms <= common.DOUBLE_CLICK_MS then
self.last_select_click_ms = 0
if self:double_click() then return true end
else
Expand Down