When the LI display in area search has been broken for 5 years and nobody noticed... :D

meow-7.2.2
Ansariel 2021-04-12 20:44:16 +02:00
parent 65cb6880c3
commit 2fbf42c0aa
2 changed files with 11 additions and 4 deletions

View File

@ -1107,15 +1107,14 @@ void FSAreaSearch::matchObject(FSObjectProperties& details, LLViewerObject* obje
mPanelList->getResultList()->refreshLineHeight();
}
// <FS:Cron> 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)

View File

@ -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);
// <FS:Cron> area search
// Update area search to have current information.
FSAreaSearch* area_search_floater = LLFloaterReg::getTypedInstance<FSAreaSearch>("area_search");
if (area_search_floater)
{
area_search_floater->updateObjectCosts(objectId, objectCost, linkCost, physicsCost, linkPhysicsCost);
}
// </FS:Cron> area search
}
else
{