diff options
author | Richard Nelson <none@none> | 2010-08-06 11:02:37 -0700 |
---|---|---|
committer | Richard Nelson <none@none> | 2010-08-06 11:02:37 -0700 |
commit | 60a313a687c5380c4a6d1a451936c85db07b681a (patch) | |
tree | dbfbaa212442f3978c4e954681a56e256700d4fc /indra | |
parent | b2028085fdfddfd5a7ac0f52d9f34b84457b3b98 (diff) |
speed up population of region scripts list
Diffstat (limited to 'indra')
-rw-r--r-- | indra/newview/llfloaterscriptlimits.cpp | 62 |
1 files changed, 34 insertions, 28 deletions
diff --git a/indra/newview/llfloaterscriptlimits.cpp b/indra/newview/llfloaterscriptlimits.cpp index e827e19f82..a77fc4710a 100644 --- a/indra/newview/llfloaterscriptlimits.cpp +++ b/indra/newview/llfloaterscriptlimits.cpp @@ -712,38 +712,44 @@ void LLPanelScriptLimitsRegionMemory::setRegionDetails(LLSD content) } } - LLSD element; + LLScrollListItem::Params item_params; + item_params.value = task_id; - element["id"] = task_id; - element["columns"][0]["column"] = "size"; - element["columns"][0]["value"] = llformat("%d", size); - element["columns"][0]["font"] = "SANSSERIF"; - element["columns"][1]["column"] = "urls"; - element["columns"][1]["value"] = llformat("%d", urls); - element["columns"][1]["font"] = "SANSSERIF"; - element["columns"][2]["column"] = "name"; - element["columns"][2]["value"] = name_buf; - element["columns"][2]["font"] = "SANSSERIF"; - element["columns"][3]["column"] = "owner"; - element["columns"][3]["value"] = owner_buf; - element["columns"][3]["font"] = "SANSSERIF"; - element["columns"][4]["column"] = "parcel"; - element["columns"][4]["value"] = parcel_name; - element["columns"][4]["font"] = "SANSSERIF"; - element["columns"][5]["column"] = "location"; - if(has_locations) - { - element["columns"][5]["value"] = llformat("<%0.1f,%0.1f,%0.1f>", location_x, location_y, location_z); - } - else - { - element["columns"][5]["value"] = ""; - } - element["columns"][5]["font"] = "SANSSERIF"; + LLScrollListCell::Params cell_params; + cell_params.font = LLFontGL::getFontSansSerif(); - list->addElement(element); + cell_params.column = "size"; + cell_params.value = size; + item_params.columns.add(cell_params); + + cell_params.column = "urls"; + cell_params.value = urls; + item_params.columns.add(cell_params); + + cell_params.column = "name"; + cell_params.value = name_buf; + item_params.columns.add(cell_params); + + cell_params.column = "owner"; + cell_params.value = owner_buf; + item_params.columns.add(cell_params); + + cell_params.column = "parcel"; + cell_params.value = parcel_name; + item_params.columns.add(cell_params); + + cell_params.column = "location"; + cell_params.value = has_locations + ? llformat("<%0.1f,%0.1f,%0.1f>", location_x, location_y, location_z) + : ""; + item_params.columns.add(cell_params); + + list->addRow(item_params); + LLSD element; element["owner_id"] = owner_id; + + element["id"] = task_id; element["local_id"] = local_id; mObjectListItems.push_back(element); } |