diff options
author | Igor Borovkov <iborovkov@productengine.com> | 2009-12-18 17:41:01 +0200 |
---|---|---|
committer | Igor Borovkov <iborovkov@productengine.com> | 2009-12-18 17:41:01 +0200 |
commit | 5dfc8d4c84d2f3d14b08988f2af4e5b14fc47a72 (patch) | |
tree | 3d757eca2107a93db7ad6d87b9b5068d90d566d9 /indra/newview/llfloatertools.cpp | |
parent | f7fadaa807a0652df1da41ac69ab069273605965 (diff) | |
parent | a09c2ba7ac798386b462745774d01c75102beaaf (diff) |
merge
--HG--
branch : product-engine
Diffstat (limited to 'indra/newview/llfloatertools.cpp')
-rw-r--r-- | indra/newview/llfloatertools.cpp | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/indra/newview/llfloatertools.cpp b/indra/newview/llfloatertools.cpp index 7fb71d4d4f..babef5b63d 100644 --- a/indra/newview/llfloatertools.cpp +++ b/indra/newview/llfloatertools.cpp @@ -93,7 +93,7 @@ // Globals LLFloaterTools *gFloaterTools = NULL; - +bool LLFloaterTools::sShowObjectCost = true; const std::string PANEL_NAMES[LLFloaterTools::PANEL_COUNT] = { @@ -286,6 +286,8 @@ BOOL LLFloaterTools::postBuild() mStatusText["grab"] = getString("status_grab"); mStatusText["place"] = getString("status_place"); mStatusText["selectland"] = getString("status_selectland"); + + sShowObjectCost = gSavedSettings.getBOOL("ShowObjectRenderingCost"); return TRUE; } @@ -425,16 +427,19 @@ void LLFloaterTools::refresh() childSetTextArg("prim_count", "[COUNT]", prim_count_string); // calculate selection rendering cost - std::string prim_cost_string; - LLResMgr::getInstance()->getIntegerString(prim_cost_string, calcRenderCost()); - childSetTextArg("RenderingCost", "[COUNT]", prim_cost_string); + if (sShowObjectCost) + { + std::string prim_cost_string; + LLResMgr::getInstance()->getIntegerString(prim_cost_string, calcRenderCost()); + childSetTextArg("RenderingCost", "[COUNT]", prim_cost_string); + } // disable the object and prim counts if nothing selected bool have_selection = ! LLSelectMgr::getInstance()->getSelection()->isEmpty(); childSetEnabled("obj_count", have_selection); childSetEnabled("prim_count", have_selection); - childSetEnabled("RenderingCost", have_selection); + childSetEnabled("RenderingCost", have_selection && sShowObjectCost); // Refresh child tabs mPanelPermissions->refresh(); @@ -566,7 +571,7 @@ void LLFloaterTools::updatePopup(LLCoordGL center, MASK mask) mBtnEdit ->setToggleState( edit_visible ); mRadioGroupEdit->setVisible( edit_visible ); bool linked_parts = gSavedSettings.getBOOL("EditLinkedParts"); - childSetVisible("RenderingCost", !linked_parts && (edit_visible || focus_visible || move_visible)); + childSetVisible("RenderingCost", !linked_parts && (edit_visible || focus_visible || move_visible) && sShowObjectCost); if (mCheckSelectIndividual) { |