diff options
| author | Oz Linden <oz@lindenlab.com> | 2011-03-03 07:50:40 -0500 |
|---|---|---|
| committer | Oz Linden <oz@lindenlab.com> | 2011-03-03 07:50:40 -0500 |
| commit | 856a6992ebb0989e5d143d987a3e9ba79bb6492e (patch) | |
| tree | 030b791d9b0d0622ab90ef7e19d6d038eaf80260 /indra/newview/llnamelistctrl.cpp | |
| parent | 0d93ce2e4a3daabc8d653290e39b67e5cddabb14 (diff) | |
| parent | b7c49f0f47f53d200df5afe4a4b68a83dd789918 (diff) | |
pull latest changes from viewer-vs2010
Diffstat (limited to 'indra/newview/llnamelistctrl.cpp')
| -rw-r--r-- | indra/newview/llnamelistctrl.cpp | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/indra/newview/llnamelistctrl.cpp b/indra/newview/llnamelistctrl.cpp index 38100aa6c5..afceb58ccf 100644 --- a/indra/newview/llnamelistctrl.cpp +++ b/indra/newview/llnamelistctrl.cpp @@ -143,6 +143,30 @@ void LLNameListCtrl::mouseOverHighlightNthItem( S32 target_index ) S32 cur_index = getHighlightedItemInx(); if (cur_index != target_index) { + bool is_mouse_over_name_cell = false; + + S32 mouse_x, mouse_y; + LLUI::getMousePositionLocal(this, &mouse_x, &mouse_y); + + S32 column_index = getColumnIndexFromOffset(mouse_x); + LLScrollListItem* hit_item = hitItem(mouse_x, mouse_y); + if (hit_item && column_index == mNameColumnIndex) + { + // Get the name cell which is currently under the mouse pointer. + LLScrollListCell* hit_cell = hit_item->getColumn(column_index); + if (hit_cell) + { + is_mouse_over_name_cell = getCellRect(cur_index, column_index).pointInRect(mouse_x, mouse_y); + } + } + + // If the tool tip is visible and the mouse is over the currently highlighted item's name cell, + // we should not reset the highlighted item index i.e. set mHighlightedItem = -1 + // and should not increase the width of the text inside the cell because it may + // overlap the tool tip icon. + if (LLToolTipMgr::getInstance()->toolTipVisible() && is_mouse_over_name_cell) + return; + if(0 <= cur_index && cur_index < (S32)getItemList().size()) { LLScrollListItem* item = getItemList()[cur_index]; |
