From 673801e6448baefb2328fc50596f6156abb0b1e6 Mon Sep 17 00:00:00 2001 From: Leyla Farazha Date: Thu, 24 Mar 2011 12:31:24 -0700 Subject: SH-1205 Lock out ability to change sculpt stitching type or sculpt map when sculpt stitching type is set to mesh --- indra/newview/llfloatertools.cpp | 4 +++- indra/newview/llpanelobject.cpp | 14 +++++++++----- 2 files changed, 12 insertions(+), 6 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llfloatertools.cpp b/indra/newview/llfloatertools.cpp index 257970aaaf..73c1f99fa0 100644 --- a/indra/newview/llfloatertools.cpp +++ b/indra/newview/llfloatertools.cpp @@ -787,7 +787,9 @@ void LLFloaterTools::updatePopup(LLCoordGL center, MASK mask) getChildView("Strength:")->setVisible( land_visible); } - bool show_mesh_cost = !gAgent.getRegion()->getCapability("GetMesh").empty() && gSavedSettings.getBOOL("MeshEnabled"); + bool show_mesh_cost = gAgent.getRegion() && + !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); diff --git a/indra/newview/llpanelobject.cpp b/indra/newview/llpanelobject.cpp index 0300ea0c92..05e185dcfd 100644 --- a/indra/newview/llpanelobject.cpp +++ b/indra/newview/llpanelobject.cpp @@ -1140,6 +1140,8 @@ void LLPanelObject::getState( ) if (selected_item == MI_SCULPT) { + + LLUUID id; LLSculptParams *sculpt_params = (LLSculptParams *)objectp->getParameterEntry(LLNetworkData::PARAMS_SCULPT); @@ -1169,10 +1171,12 @@ void LLPanelObject::getState( ) BOOL sculpt_mirror = sculpt_type & LL_SCULPT_FLAG_MIRROR; isMesh = (sculpt_stitching == LL_SCULPT_TYPE_MESH); + mComboBaseType->setEnabled(!isMesh); + if (mCtrlSculptType) { mCtrlSculptType->setCurrentByIndex(sculpt_stitching); - mCtrlSculptType->setEnabled(editable); + mCtrlSculptType->setEnabled(editable && !isMesh); } if (mCtrlSculptMirror) @@ -1924,6 +1928,7 @@ void LLPanelObject::refresh() } bool enable_mesh = gSavedSettings.getBOOL("MeshEnabled") && + gAgent.getRegion() && !gAgent.getRegion()->getCapability("GetMesh").empty(); getChildView("label physicsshapetype")->setVisible(enable_mesh); @@ -1940,15 +1945,14 @@ void LLPanelObject::refresh() getChild("Scale Y")->setMaxValue(max_scale); getChild("Scale Z")->setMaxValue(max_scale); - LLComboBox* sculpt_combo = getChild("sculpt type control"); - BOOL found = sculpt_combo->itemExists("Mesh"); + BOOL found = mCtrlSculptType->itemExists("Mesh"); if (enable_mesh && !found) { - sculpt_combo->add("Mesh"); + mCtrlSculptType->add("Mesh"); } else if (!enable_mesh && found) { - sculpt_combo->remove("Mesh"); + mCtrlSculptType->remove("Mesh"); } } -- cgit v1.2.3