diff options
| author | Eugene Mutavchi <emutavchi@productengine.com> | 2009-11-26 15:45:06 +0200 | 
|---|---|---|
| committer | Eugene Mutavchi <emutavchi@productengine.com> | 2009-11-26 15:45:06 +0200 | 
| commit | e6187ecaebcd39fd164f900a15710be6e21ecaf8 (patch) | |
| tree | 7d1da987c532464485168eaa3f3c5bb5096d7230 | |
| parent | 8a812495daa52aa9ae092222c23c5f8815929544 (diff) | |
Fixed low bug EXT-2746 ("All friends" list not scrolled when traversing it with arrow keys)
--HG--
branch : product-engine
| -rw-r--r-- | indra/llui/llflatlistview.cpp | 19 | 
1 files changed, 14 insertions, 5 deletions
| diff --git a/indra/llui/llflatlistview.cpp b/indra/llui/llflatlistview.cpp index 8de3a8a96f..26a03e922a 100644 --- a/indra/llui/llflatlistview.cpp +++ b/indra/llui/llflatlistview.cpp @@ -554,12 +554,21 @@ BOOL LLFlatListView::handleKeyHere(KEY key, MASK mask)  			break;  	} -	if ( key == KEY_UP || key == KEY_DOWN ) +	if ( ( key == KEY_UP || key == KEY_DOWN ) && mSelectedItemPairs.size() )  	{ -		LLRect selcted_rect = getLastSelectedItemRect().stretch(1); -		LLRect visible_rect = getVisibleContentRect(); -		if ( !visible_rect.contains (selcted_rect) ) -			scrollToShowRect(selcted_rect); +		LLRect visible_rc = getVisibleContentRect(); +		LLRect selected_rc = getLastSelectedItemRect(); + +		if ( !visible_rc.contains (selected_rc) ) +		{ +			// But scroll in Items panel coordinates +			scrollToShowRect(selected_rc); +		} + +		// In case we are in accordion tab notify parent to show selected rectangle +		LLRect screen_rc; +		localRectToScreen(selected_rc, &screen_rc); +		notifyParent(LLSD().insert("scrollToShowRect",screen_rc.getValue()));  		handled = TRUE;  	} | 
