From 1bbd259f2d009a807a09aea15d01d0872f8b1cad Mon Sep 17 00:00:00 2001 From: richard Date: Wed, 6 Jan 2010 11:17:38 -0800 Subject: EXT-3878 - Menus disappear when UI Size is < 1.00 EXT-3647 - Auto-scrolling of IMs should resume when user types in chat EXT-3877 - Pinning two levels of menus prevents movement using arrow keys EXT-1303 - Hyperlink text wraps in the middle of a word reviewed by James --- indra/llrender/llfontgl.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/llrender/llfontgl.cpp') diff --git a/indra/llrender/llfontgl.cpp b/indra/llrender/llfontgl.cpp index 37a28ac721..d3497c1c23 100644 --- a/indra/llrender/llfontgl.cpp +++ b/indra/llrender/llfontgl.cpp @@ -562,7 +562,7 @@ S32 LLFontGL::maxDrawableChars(const llwchar* wchars, F32 max_pixels, S32 max_ch drawn_x = cur_x; } - if( clip && end_on_word_boundary && (start_of_last_word != 0) ) + if( clip && end_on_word_boundary ) { i = start_of_last_word; } -- cgit v1.2.3 From 49660730308fb6d5301d1617402a353a21e9d9be Mon Sep 17 00:00:00 2001 From: richard Date: Wed, 6 Jan 2010 12:23:56 -0800 Subject: moved clipping logic inside LLFontGL::maxDrawableChars controlled by EWordWrapStyle fixes regression introduced in 3eef5ce9ae1e6fc62b9b52ce859501dd4e70fadf reviewed by Brad --- indra/llrender/llfontgl.cpp | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) (limited to 'indra/llrender/llfontgl.cpp') diff --git a/indra/llrender/llfontgl.cpp b/indra/llrender/llfontgl.cpp index d3497c1c23..1de1d6ded4 100644 --- a/indra/llrender/llfontgl.cpp +++ b/indra/llrender/llfontgl.cpp @@ -472,7 +472,7 @@ F32 LLFontGL::getWidthF32(const llwchar* wchars, S32 begin_offset, S32 max_chars } // Returns the max number of complete characters from text (up to max_chars) that can be drawn in max_pixels -S32 LLFontGL::maxDrawableChars(const llwchar* wchars, F32 max_pixels, S32 max_chars, BOOL end_on_word_boundary) const +S32 LLFontGL::maxDrawableChars(const llwchar* wchars, F32 max_pixels, S32 max_chars, EWordWrapStyle end_on_word_boundary) const { if (!wchars || !wchars[0] || max_chars == 0) { @@ -562,9 +562,24 @@ S32 LLFontGL::maxDrawableChars(const llwchar* wchars, F32 max_pixels, S32 max_ch drawn_x = cur_x; } - if( clip && end_on_word_boundary ) + if( clip ) { - i = start_of_last_word; + switch (end_on_word_boundary) + { + case ONLY_WORD_BOUNDARIES: + i = start_of_last_word; + break; + case WORD_BOUNDARY_IF_POSSIBLE: + if (start_of_last_word != 0) + { + i = start_of_last_word; + } + break; + default: + case ANYWHERE: + // do nothing + break; + } } return i; } -- cgit v1.2.3