From 75d3856811a05a51888bb4fa22766ac8f8ec02be Mon Sep 17 00:00:00 2001 From: Yuri Chebotarev <ychebotarev@productengine.com> Date: Tue, 22 Jun 2010 15:50:34 +0300 Subject: EXT-7654 FIX "AddText" didn't create image segment now, use appendImageSegment reviewed by Richard Nelson, Vadim Savchuk at https://codereview.productengine.com/secondlife/r/616/ --HG-- branch : product-engine --- indra/llui/lltextbase.cpp | 4 ++-- indra/llui/lltextbase.h | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'indra/llui') diff --git a/indra/llui/lltextbase.cpp b/indra/llui/lltextbase.cpp index 2d0d5c12cb..17e41d9e24 100644 --- a/indra/llui/lltextbase.cpp +++ b/indra/llui/lltextbase.cpp @@ -1630,7 +1630,7 @@ void LLTextBase::appendTextImpl(const std::string &new_text, const LLStyle::Para // Text will be replaced during rendering with the icon, // but string cannot be empty or the segment won't be // added (or drawn). - appendImageSegment(part, icon); + appendImageSegment(icon); } } @@ -1702,7 +1702,7 @@ void LLTextBase::appendLineBreakSegment(const LLStyle::Params& style_params) insertStringNoUndo(getLength(), utf8str_to_wstring("\n"), &segments); } -void LLTextBase::appendImageSegment(S32 highlight_part, const LLStyle::Params& style_params) +void LLTextBase::appendImageSegment(const LLStyle::Params& style_params) { if(getPlainText()) { diff --git a/indra/llui/lltextbase.h b/indra/llui/lltextbase.h index 92876e20d6..fe8ebb1b80 100644 --- a/indra/llui/lltextbase.h +++ b/indra/llui/lltextbase.h @@ -196,6 +196,9 @@ public: const LLFontGL* getDefaultFont() const { return mDefaultFont; } + void appendLineBreakSegment(const LLStyle::Params& style_params); + void appendImageSegment(const LLStyle::Params& style_params); + public: // Fired when a URL link is clicked commit_signal_t mURLClickSignal; @@ -319,9 +322,6 @@ protected: void updateRects(); void needsScroll() { mScrollNeeded = TRUE; } void replaceUrlLabel(const std::string &url, const std::string &label); - - void appendLineBreakSegment(const LLStyle::Params& style_params); - void appendImageSegment(S32 highlight_part, const LLStyle::Params& style_params); void appendTextImpl(const std::string &new_text, const LLStyle::Params& input_params = LLStyle::Params()); void appendAndHighlightTextImpl(const std::string &new_text, S32 highlight_part, const LLStyle::Params& style_params); -- cgit v1.2.3 From 25de07a379aaacfc7eb37dd91f33005acd3791ae Mon Sep 17 00:00:00 2001 From: Leyla Farazha <leyla@lindenlab.com> Date: Tue, 22 Jun 2010 16:14:22 -0700 Subject: EXT-7980 Double-clicking no longer selects contents of number fields reviewed by Richard --- indra/llui/llbutton.cpp | 7 +++++++ indra/llui/llbutton.h | 1 + indra/llui/llspinctrl.cpp | 5 ----- indra/llui/llspinctrl.h | 1 - 4 files changed, 8 insertions(+), 6 deletions(-) (limited to 'indra/llui') diff --git a/indra/llui/llbutton.cpp b/indra/llui/llbutton.cpp index 34f3049f2e..c678d78eb5 100644 --- a/indra/llui/llbutton.cpp +++ b/indra/llui/llbutton.cpp @@ -1162,3 +1162,10 @@ void LLButton::resetMouseDownTimer() mMouseDownTimer.stop(); mMouseDownTimer.reset(); } + + +BOOL LLButton::handleDoubleClick(S32 x, S32 y, MASK mask) +{ + // just treat a double click as a second click + return handleMouseDown(x, y, mask); +} \ No newline at end of file diff --git a/indra/llui/llbutton.h b/indra/llui/llbutton.h index 9bd566d3c9..d7ab030a47 100644 --- a/indra/llui/llbutton.h +++ b/indra/llui/llbutton.h @@ -152,6 +152,7 @@ public: virtual BOOL handleHover(S32 x, S32 y, MASK mask); virtual BOOL handleRightMouseDown(S32 x, S32 y, MASK mask); virtual BOOL handleRightMouseUp(S32 x, S32 y, MASK mask); + virtual BOOL handleDoubleClick(S32 x, S32 y, MASK mask); virtual void draw(); /*virtual*/ BOOL postBuild(); diff --git a/indra/llui/llspinctrl.cpp b/indra/llui/llspinctrl.cpp index c0d02fa8e9..ac0c9c3e45 100644 --- a/indra/llui/llspinctrl.cpp +++ b/indra/llui/llspinctrl.cpp @@ -466,8 +466,3 @@ BOOL LLSpinCtrl::handleKeyHere(KEY key, MASK mask) return FALSE; } -BOOL LLSpinCtrl::handleDoubleClick(S32 x, S32 y, MASK mask) -{ - // just treat a double click as a second click - return handleMouseDown(x, y, mask); -} diff --git a/indra/llui/llspinctrl.h b/indra/llui/llspinctrl.h index 06201255d2..00d6f86f83 100644 --- a/indra/llui/llspinctrl.h +++ b/indra/llui/llspinctrl.h @@ -94,7 +94,6 @@ public: virtual BOOL handleScrollWheel(S32 x,S32 y,S32 clicks); virtual BOOL handleKeyHere(KEY key, MASK mask); - virtual BOOL handleDoubleClick(S32 x, S32 y, MASK mask); void onEditorCommit(const LLSD& data); static void onEditorGainFocus(LLFocusableElement* caller, void *userdata); -- cgit v1.2.3 From 11ec720a063b73fc042e8b06338b9526835dbb6b Mon Sep 17 00:00:00 2001 From: Leyla Farazha <leyla@lindenlab.com> Date: Tue, 22 Jun 2010 16:55:08 -0700 Subject: adding eol --- indra/llui/llbutton.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/llui') diff --git a/indra/llui/llbutton.cpp b/indra/llui/llbutton.cpp index c678d78eb5..39e46a7ccb 100644 --- a/indra/llui/llbutton.cpp +++ b/indra/llui/llbutton.cpp @@ -1168,4 +1168,4 @@ BOOL LLButton::handleDoubleClick(S32 x, S32 y, MASK mask) { // just treat a double click as a second click return handleMouseDown(x, y, mask); -} \ No newline at end of file +} -- cgit v1.2.3