Skip to content
This repository has been archived by the owner on Jun 1, 2019. It is now read-only.

Commit

Permalink
Make sure both clicks of a Doubleclick are on the same item
Browse files Browse the repository at this point in the history
  • Loading branch information
danopia committed Mar 4, 2010
1 parent a4e7e05 commit f68a12d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion ui/listbox.rb
Expand Up @@ -143,6 +143,8 @@ def handle_click button, modifiers, x, y
end
@lastclick = Time.now

previous = @index

row = y1
data[@offset, height].each_with_index do |line, index|
_height = line_height(line)
Expand All @@ -157,7 +159,7 @@ def handle_click button, modifiers, x, y
end
end

handler.call self, @data[@index] if button == :double && handler
handler.call self, @data[@index] if button == :double && previous == @index && handler

end
redraw
Expand Down

0 comments on commit f68a12d

Please sign in to comment.