Commits

Loren Shih  committed 7ce7821

SH-1467 WIP Viewer checks the wrong cap for mesh-ui disable

Fixes that need to go into trunk because certain Mesh UI elements are showing up on DRTSIM-52. These fixes will probably be overwritten by the actual resolution of SH-1467 but I need this workaround now.

  • Participants
  • Parent commits e7b622f

Comments (0)

Files changed (2)

File indra/newview/llfloatertools.cpp

 	// Refresh object and prim count labels
 	LLLocale locale(LLLocale::USER_LOCALE);
 
-	if ((gAgent.getRegion() && gAgent.getRegion()->getCapability("GetMesh").empty()) || !gSavedSettings.getBOOL("MeshEnabled"))
+	if ((gAgent.getRegion() && (gAgent.getRegion()->getCapability("GetMesh").empty() || gAgent.getRegion()->getCapability("ObjectAdd").empty())) || !gSavedSettings.getBOOL("MeshEnabled"))
 	{		
 		std::string obj_count_string;
 		LLResMgr::getInstance()->getIntegerString(obj_count_string, LLSelectMgr::getInstance()->getSelection()->getRootObjectCount());
 
 	bool show_mesh_cost = gAgent.getRegion() && 
 		                  !gAgent.getRegion()->getCapability("GetMesh").empty() && 
-						  gSavedSettings.getBOOL("MeshEnabled");
+						  gSavedSettings.getBOOL("MeshEnabled") &&
+						  !gAgent.getRegion()->getCapability("ObjectAdd").empty();
 
 	getChildView("obj_count")->setVisible( !land_visible && !show_mesh_cost);
 	getChildView("prim_count")->setVisible( !land_visible && !show_mesh_cost);

File indra/newview/llpanelobject.cpp

 	
 	bool enable_mesh = gSavedSettings.getBOOL("MeshEnabled") && 
 					   gAgent.getRegion() &&
-					   !gAgent.getRegion()->getCapability("GetMesh").empty();
+					   !gAgent.getRegion()->getCapability("GetMesh").empty() &&
+					   !gAgent.getRegion()->getCapability("ObjectAdd").empty();
 
 	F32 max_scale = get_default_max_prim_scale(LLPickInfo::isFlora(mObject));