From 2fbf42c0aae7fe67565de904b2c4fc7953dcf894 Mon Sep 17 00:00:00 2001 From: Ansariel Date: Mon, 12 Apr 2021 20:44:16 +0200 Subject: [PATCH] When the LI display in area search has been broken for 5 years and nobody noticed... :D --- indra/newview/fsareasearch.cpp | 6 ++---- indra/newview/llviewerobjectlist.cpp | 9 +++++++++ 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/indra/newview/fsareasearch.cpp b/indra/newview/fsareasearch.cpp index c9017f0b7e..c538809a82 100644 --- a/indra/newview/fsareasearch.cpp +++ b/indra/newview/fsareasearch.cpp @@ -1107,15 +1107,14 @@ void FSAreaSearch::matchObject(FSObjectProperties& details, LLViewerObject* obje mPanelList->getResultList()->refreshLineHeight(); } -// Allows the object costs to be updated on-the-fly so as to bypass the problem with the data being stale when first accessed. void FSAreaSearch::updateObjectCosts(const LLUUID& object_id, F32 object_cost, F32 link_cost, F32 physics_cost, F32 link_physics_cost) { - // This fuction is called by LLObjectCostResponder::result even if no floater has been created. + // This fuction is called by LLViewerObjectList::fetchObjectCostsCoro even if no floater has been created. if (!(mInstance && mActive)) { return; } - + FSScrollListCtrl* result_list = mPanelList->getResultList(); if (result_list) { @@ -1131,7 +1130,6 @@ void FSAreaSearch::updateObjectCosts(const LLUUID& object_id, F32 object_cost, F } } } - } void FSAreaSearch::getNameFromUUID(const LLUUID& id, bool needs_rlva_check, std::string& name, bool group, bool& name_requested) diff --git a/indra/newview/llviewerobjectlist.cpp b/indra/newview/llviewerobjectlist.cpp index 999dbaf40b..0a45c71c97 100644 --- a/indra/newview/llviewerobjectlist.cpp +++ b/indra/newview/llviewerobjectlist.cpp @@ -1262,6 +1262,15 @@ void LLViewerObjectList::fetchObjectCostsCoro(std::string url) F32 linkPhysicsCost = objectData["linked_set_physics_cost"].asReal(); gObjectList.updateObjectCost(objectId, objectCost, linkCost, physicsCost, linkPhysicsCost); + + // area search + // Update area search to have current information. + FSAreaSearch* area_search_floater = LLFloaterReg::getTypedInstance("area_search"); + if (area_search_floater) + { + area_search_floater->updateObjectCosts(objectId, objectCost, linkCost, physicsCost, linkPhysicsCost); + } + // area search } else {