From d74c5813600244b62d3779ccc5873b2bfe8befc2 Mon Sep 17 00:00:00 2001 From: leyla_linden Date: Wed, 9 Feb 2011 15:09:15 -0800 Subject: SH-938 [REGRESSION] Mesh costs and old style costs shown in Edit tools on mesh region with MeshEnabled set to False --- indra/newview/llfloatertools.cpp | 38 ++++++++++---------------------------- 1 file changed, 10 insertions(+), 28 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llfloatertools.cpp b/indra/newview/llfloatertools.cpp index a404aa0b1c..bef830a93e 100644 --- a/indra/newview/llfloatertools.cpp +++ b/indra/newview/llfloatertools.cpp @@ -431,13 +431,6 @@ void LLFloaterTools::refresh() getChild("RenderingCost")->setTextArg("[COUNT]", prim_cost_string); } - getChildView("linked_set_count")->setVisible(false); - getChildView("linked_set_cost")->setVisible(false); - getChildView("object_count")->setVisible(false); - getChildView("object_cost")->setVisible(false); - getChildView("obj_count")->setVisible(true); - getChildView("prim_count")->setVisible(true); - // disable the object and prim counts if nothing selected bool have_selection = ! LLSelectMgr::getInstance()->getSelection()->isEmpty(); getChildView("obj_count")->setEnabled(have_selection); @@ -495,13 +488,6 @@ void LLFloaterTools::refresh() childSetEnabled("linked_set_cost", have_selection); childSetEnabled("object_cost", have_selection); getChildView("RenderingCost")->setEnabled(have_selection && sShowObjectCost); - - getChildView("linked_set_count")->setVisible(true); - getChildView("linked_set_cost")->setVisible(true); - getChildView("object_count")->setVisible(true); - getChildView("object_cost")->setVisible(true); - getChildView("obj_count")->setVisible(false); - getChildView("prim_count")->setVisible(false); } @@ -787,20 +773,16 @@ void LLFloaterTools::updatePopup(LLCoordGL center, MASK mask) getChildView("Strength:")->setVisible( land_visible); } - if (gAgent.getRegion()->getCapability("GetMesh").empty()) - { - getChildView("obj_count")->setVisible( !land_visible); - getChildView("prim_count")->setVisible( !land_visible); - getChildView("RenderingCost")->setVisible( !land_visible && sShowObjectCost); - } - else - { - getChildView("linked_set_count")->setVisible( !land_visible); - getChildView("linked_set_cost")->setVisible( !land_visible); - getChildView("object_count")->setVisible( !land_visible); - getChildView("object_cost")->setVisible( !land_visible); - getChildView("RenderingCost")->setVisible( !land_visible && sShowObjectCost); - } + bool show_mesh_cost = !gAgent.getRegion()->getCapability("GetMesh").empty() && gSavedSettings.getBOOL("MeshEnabled"); + + getChildView("obj_count")->setVisible( !land_visible && !show_mesh_cost); + getChildView("prim_count")->setVisible( !land_visible && !show_mesh_cost); + getChildView("linked_set_count")->setVisible( !land_visible && show_mesh_cost); + getChildView("linked_set_cost")->setVisible( !land_visible && show_mesh_cost); + getChildView("object_count")->setVisible( !land_visible && show_mesh_cost); + getChildView("object_cost")->setVisible( !land_visible && show_mesh_cost); + getChildView("RenderingCost")->setVisible( !land_visible && sShowObjectCost); + mTab->setVisible(!land_visible); mPanelLandInfo->setVisible(land_visible); } -- cgit v1.2.3