summaryrefslogtreecommitdiff
path: root/indra/newview/llfloatertools.cpp
diff options
context:
space:
mode:
authorNyx (Neal Orman) <nyx@lindenlab.com>2011-06-28 15:36:26 -0400
committerNyx (Neal Orman) <nyx@lindenlab.com>2011-06-28 15:36:26 -0400
commit41f3080d93c0a6efdf415981a2f168bbc55dd73a (patch)
tree1ac226e62712603e4e1047e52014befb61669abc /indra/newview/llfloatertools.cpp
parent4df70b55233ecf6bd6ed89a42281ce62d90c672f (diff)
SH-1917 SH-1935 FIX PE cost is not always shown, includes unnecessary digits
Reformatted line showing prim equiv values, formatted to an integer, removed old Render Cost display, and updated label of new display.
Diffstat (limited to 'indra/newview/llfloatertools.cpp')
-rw-r--r--indra/newview/llfloatertools.cpp24
1 files changed, 14 insertions, 10 deletions
diff --git a/indra/newview/llfloatertools.cpp b/indra/newview/llfloatertools.cpp
index 3e98cff9e6..1b6feddb6c 100644
--- a/indra/newview/llfloatertools.cpp
+++ b/indra/newview/llfloatertools.cpp
@@ -455,27 +455,31 @@ void LLFloaterTools::refresh()
S32 prim_count = LLSelectMgr::getInstance()->getSelection()->getObjectCount();
S32 link_count = LLSelectMgr::getInstance()->getSelection()->getRootObjectCount();
- LLStringUtil::format_map_t args;
- args["OBJ_COUNT"] = llformat("%.1d", link_count);
- args["PRIM_COUNT"] = llformat("%.1d", prim_count);
+ LLStringUtil::format_map_t selection_args;
+ selection_args["OBJ_COUNT"] = llformat("%.1d", link_count);
+ selection_args["PRIM_COUNT"] = llformat("%.1d", prim_count);
std::ostringstream selection_info;
- selection_info << getString("status_selectcount", args);
- bool show_prim_equiv = (link_cost != prim_count) && link_cost;
bool show_adv_weight = gSavedSettings.getBOOL("ShowAdvancedBuilderOptions");
bool show_mesh_cost = gMeshRepo.meshRezEnabled();
- if (show_prim_equiv && show_mesh_cost)
+ if (show_mesh_cost)
{
- selection_info << ": ";
- args["SEL_WEIGHT"] = llformat("%.1f", link_cost);
- selection_info << getString("status_selectprimequiv", args);
+ LLStringUtil::format_map_t prim_equiv_args;
+ prim_equiv_args["SEL_WEIGHT"] = llformat("%.1d", (S32)link_cost);
+ selection_args["PE_STRING"] = getString("status_selectprimequiv", prim_equiv_args);
}
+ else
+ {
+ selection_args["PE_STRING"] = "";
+ }
+
+ selection_info << getString("status_selectcount", selection_args);
if (show_adv_weight)
{
- show_prim_equiv ? (selection_info << ",") : (selection_info << ".");
+ selection_info << ",";
childSetTextArg("selection_weight", "[PHYS_WEIGHT]", llformat("%.1f", link_phys_cost));
childSetTextArg("selection_weight", "[DISP_WEIGHT]", llformat("%.1d", calcRenderCost()));