summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--indra/newview/llmaterialmgr.cpp21
-rw-r--r--indra/newview/llpanelface.cpp44
2 files changed, 21 insertions, 44 deletions
diff --git a/indra/newview/llmaterialmgr.cpp b/indra/newview/llmaterialmgr.cpp
index d74cc0c6ed..474e6b862e 100644
--- a/indra/newview/llmaterialmgr.cpp
+++ b/indra/newview/llmaterialmgr.cpp
@@ -494,6 +494,11 @@ void LLMaterialMgr::processGetQueue()
material_queue_t& materials = itRegionQueue->second;
material_queue_t::iterator loopMaterial = materials.begin();
+ if (materials.end() == loopMaterial)
+ {
+ //LL_INFOS("Material") << "Get queue for region empty, trying next region." << LL_ENDL;
+ continue;
+ }
while ( (materials.end() != loopMaterial) && (materialsData.size() <= MATERIALS_GET_MAX_ENTRIES) )
{
material_queue_t::iterator itMaterial = loopMaterial++;
@@ -612,14 +617,8 @@ void LLMaterialMgr::processPutQueue()
std::string materialString = zip_llsd(materialsData);
S32 materialSize = materialString.size();
- if (materialSize <= 0)
- {
- LL_ERRS("Materials") << "cannot zip LLSD binary content" << LL_ENDL;
- mPutQueue.erase(itQueue);
- continue;
- }
- else
+ if (materialSize > 0)
{
LLSD::Binary materialBinary;
materialBinary.resize(materialSize);
@@ -632,6 +631,11 @@ void LLMaterialMgr::processPutQueue()
LLHTTPClient::ResponderPtr materialsResponder = new LLMaterialsResponder("PUT", capURL, boost::bind(&LLMaterialMgr::onPutResponse, this, _1, _2));
LLHTTPClient::put(capURL, putData, materialsResponder);
}
+ else
+ {
+ LL_ERRS("debugMaterials") << "cannot zip LLSD binary content" << LL_ENDL;
+ }
+ mPutQueue.erase(itQueue);
}
}
@@ -659,6 +663,5 @@ void LLMaterialMgr::onRegionRemoved(LLViewerRegion* regionp)
mGetAllPending.erase(region_id);
mGetAllCallbacks.erase(region_id);
- // Put
-// mPutQueue.erase(region_id);
+ // Put doesn't need clearing: objects that can't be found will clean up in processPutQueue()
}
diff --git a/indra/newview/llpanelface.cpp b/indra/newview/llpanelface.cpp
index 474fa9d58e..e0f9ec9b99 100644
--- a/indra/newview/llpanelface.cpp
+++ b/indra/newview/llpanelface.cpp
@@ -1206,23 +1206,6 @@ void LLPanelFace::refresh()
void LLPanelFace::onMaterialLoaded(const LLMaterialID& material_id, const LLMaterialPtr material)
{
mMaterial = material;
-#if 0
- static LLMaterialID old_material_id = LLMaterialID::null;
- if (material_id == old_material_id)
- {
- llinfos << "Material ID " << material_id.asString()
- << " unchanged, not updating" << llendl;
- return;
- }
- else
- {
- llinfos << "Material ID changed, old " << old_material_id.asString()
- << ", new " << material_id.asString()
- << ", updating controls: " << material->asLLSD()
- << llendl;
- }
- old_material_id = material_id;
-#endif
// Alpha
LLCtrlSelectionInterface* combobox_alphamode =
childGetSelectionInterface("combobox alphamode");
@@ -1385,8 +1368,7 @@ void LLPanelFace::onCommitColor(const LLSD& data)
void LLPanelFace::onCommitShinyColor(const LLSD& data)
{
- llinfos << "updating material" << llendl;
- //updateMaterial();
+ updateMaterial();
}
void LLPanelFace::onCommitAlpha(const LLSD& data)
@@ -1528,7 +1510,6 @@ void LLPanelFace::onCommitTexGen(LLUICtrl* ctrl, void* userdata)
// static
void LLPanelFace::updateShinyControls(LLUICtrl* ctrl, void* userdata)
{
- llinfos << "Entered." << llendl;
LLPanelFace* self = (LLPanelFace*) userdata;
LLComboBox* comboShiny = self->getChild<LLComboBox>("combobox shininess");
if (!comboShiny)
@@ -1550,14 +1531,12 @@ void LLPanelFace::onCommitShiny(LLUICtrl* ctrl, void* userdata)
{
LLPanelFace* self = (LLPanelFace*) userdata;
self->sendShiny();
- llinfos << "updating material" << llendl;
- //self->updateMaterial();
+ self->updateMaterial();
}
// static
void LLPanelFace::updateAlphaControls(LLUICtrl* ctrl, void* userdata)
{
- llinfos << "Entered." << llendl;
LLPanelFace* self = (LLPanelFace*) userdata;
LLComboBox* comboAlphaMode = self->getChild<LLComboBox>("combobox alphamode");
if (!comboAlphaMode)
@@ -1573,10 +1552,9 @@ void LLPanelFace::updateAlphaControls(LLUICtrl* ctrl, void* userdata)
// static
void LLPanelFace::onCommitAlphaMode(LLUICtrl* ctrl, void* userdata)
{
- //LLPanelFace* self = (LLPanelFace*) userdata;
+ LLPanelFace* self = (LLPanelFace*) userdata;
updateAlphaControls(ctrl,userdata);
- llinfos << "updating material" << llendl;
- //self->updateMaterial();
+ self->updateMaterial();
}
// static
@@ -1630,29 +1608,25 @@ void LLPanelFace::onSelectTexture(const LLSD& data)
void LLPanelFace::onCommitMaterialTexture( const LLSD& data )
{
- llinfos << "updating material" << llendl;
- //updateMaterial();
+ updateMaterial();
}
void LLPanelFace::onCancelMaterialTexture(const LLSD& data)
{
// not sure what to do here other than
- llinfos << "updating material" << llendl;
- //updateMaterial();
+ updateMaterial();
}
void LLPanelFace::onSelectMaterialTexture(const LLSD& data)
{
- llinfos << "updating material" << llendl;
- //updateMaterial();
+ updateMaterial();
}
//static
void LLPanelFace::onCommitMaterial(LLUICtrl* ctrl, void* userdata)
{
- llinfos << "updating material" << llendl;
- //LLPanelFace* self = (LLPanelFace*) userdata;
- //self->updateMaterial();
+ LLPanelFace* self = (LLPanelFace*) userdata;
+ self->updateMaterial();
}
// static