From 195c09748ef2b30b95942f4261128bf3a76c9582 Mon Sep 17 00:00:00 2001 From: Richard Nelson Date: Fri, 16 Oct 2009 20:34:10 +0000 Subject: double click on scrollbar now scrolls twice reviewed by Leyla --- indra/llui/llscrollbar.cpp | 7 +++++++ indra/llui/llscrollbar.h | 1 + 2 files changed, 8 insertions(+) (limited to 'indra/llui') diff --git a/indra/llui/llscrollbar.cpp b/indra/llui/llscrollbar.cpp index cb4147709d..a75a0c6979 100644 --- a/indra/llui/llscrollbar.cpp +++ b/indra/llui/llscrollbar.cpp @@ -452,6 +452,13 @@ BOOL LLScrollbar::handleMouseUp(S32 x, S32 y, MASK mask) return handled; } +BOOL LLScrollbar::handleDoubleClick(S32 x, S32 y, MASK mask) +{ + // just treat a double click as a second click + return handleMouseDown(x, y, mask); +} + + void LLScrollbar::reshape(S32 width, S32 height, BOOL called_from_parent) { if (width == getRect().getWidth() && height == getRect().getHeight()) return; diff --git a/indra/llui/llscrollbar.h b/indra/llui/llscrollbar.h index 2e95779624..865a1db409 100644 --- a/indra/llui/llscrollbar.h +++ b/indra/llui/llscrollbar.h @@ -93,6 +93,7 @@ public: virtual BOOL handleKeyHere(KEY key, MASK mask); virtual BOOL handleMouseDown(S32 x, S32 y, MASK mask); virtual BOOL handleMouseUp(S32 x, S32 y, MASK mask); + virtual BOOL handleDoubleClick(S32 x, S32 y, MASK mask); virtual BOOL handleHover(S32 x, S32 y, MASK mask); virtual BOOL handleScrollWheel(S32 x, S32 y, S32 clicks); virtual BOOL handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, -- cgit v1.2.3