diff options
author | Vadim Savchuk <vsavchuk@productengine.com> | 2010-03-26 19:02:14 +0200 |
---|---|---|
committer | Vadim Savchuk <vsavchuk@productengine.com> | 2010-03-26 19:02:14 +0200 |
commit | 5a12802503b8e557b5cdd99202466bb293a4474f (patch) | |
tree | 204fdc82182a9ea88768b0d956f70d59924b6314 /indra | |
parent | a5227864bd7ca930b41041ff80b20c30474f5f8c (diff) |
Fixed bug EXT-6268 (Group spawns Resident inspector when called from About Land > Objects for group deeded object)
Reason: groups were added to the list as avatars, which led to invoking
incorrect inspector on hover.
Also added a fix for potential crash on hovering name list items.
Reviewed by Leyla: https://codereview.productengine.com/secondlife/r/110/
--HG--
branch : product-engine
Diffstat (limited to 'indra')
-rw-r--r-- | indra/newview/llfloaterland.cpp | 2 | ||||
-rw-r--r-- | indra/newview/llnamelistctrl.cpp | 24 |
2 files changed, 20 insertions, 6 deletions
diff --git a/indra/newview/llfloaterland.cpp b/indra/newview/llfloaterland.cpp index 65003d9b5c..5dc63b7ef2 100644 --- a/indra/newview/llfloaterland.cpp +++ b/indra/newview/llfloaterland.cpp @@ -1612,7 +1612,7 @@ void LLPanelLandObjects::processParcelObjectOwnersReply(LLMessageSystem *msg, vo item_params.columns.add().value(object_count_str).font(FONT).column("count"); item_params.columns.add().value(LLDate((time_t)most_recent_time)).font(FONT).column("mostrecent").type("date"); - self->mOwnerList->addRow(item_params); + self->mOwnerList->addNameItemRow(item_params); lldebugs << "object owner " << owner_id << " (" << (is_group_owned ? "group" : "agent") << ") owns " << object_count << " objects." << llendl; diff --git a/indra/newview/llnamelistctrl.cpp b/indra/newview/llnamelistctrl.cpp index 7a538e372b..9611c286eb 100644 --- a/indra/newview/llnamelistctrl.cpp +++ b/indra/newview/llnamelistctrl.cpp @@ -148,16 +148,30 @@ void LLNameListCtrl::mouseOverHighlightNthItem( S32 target_index ) if(0 <= cur_index && cur_index < (S32)getItemList().size()) { LLScrollListItem* item = getItemList()[cur_index]; - LLScrollListText* cell = dynamic_cast<LLScrollListText*>(item->getColumn(mNameColumnIndex)); - if(cell) - cell->setTextWidth(cell->getTextWidth() + info_icon_size); + if (item) + { + LLScrollListText* cell = dynamic_cast<LLScrollListText*>(item->getColumn(mNameColumnIndex)); + if (cell) + cell->setTextWidth(cell->getTextWidth() + info_icon_size); + } + else + { + llwarns << "highlighted name list item is NULL" << llendl; + } } if(target_index != -1) { LLScrollListItem* item = getItemList()[target_index]; LLScrollListText* cell = dynamic_cast<LLScrollListText*>(item->getColumn(mNameColumnIndex)); - if(cell) - cell->setTextWidth(cell->getTextWidth() - info_icon_size); + if (item) + { + if (cell) + cell->setTextWidth(cell->getTextWidth() - info_icon_size); + } + else + { + llwarns << "target name item is NULL" << llendl; + } } } |