summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--indra/newview/llmaterialeditor.cpp23
1 files changed, 14 insertions, 9 deletions
diff --git a/indra/newview/llmaterialeditor.cpp b/indra/newview/llmaterialeditor.cpp
index 70ba77e18b..20fee6686c 100644
--- a/indra/newview/llmaterialeditor.cpp
+++ b/indra/newview/llmaterialeditor.cpp
@@ -2221,17 +2221,22 @@ void LLMaterialEditor::applyToSelection()
std::string url = gAgent.getRegionCapability("ModifyMaterialParams");
if (!url.empty())
{
- mOverrideInProgress = true;
- LLObjectSelectionHandle selected_objects = LLSelectMgr::getInstance()->getSelection();
- // TODO figure out how to get the right asset id in cases where we don't have a good one
- LLRenderMaterialOverrideFunctor override_func(this, url);
- if (!selected_objects->applyToTEs(&override_func))
+ // Don't send data if there is nothing to send.
+ // Some UI elements will cause multiple commits,
+ // like spin ctrls on click and on down
+ if (mUnsavedChanges != 0)
{
- mOverrideInProgress = false;
- }
+ mOverrideInProgress = true;
+ LLObjectSelectionHandle selected_objects = LLSelectMgr::getInstance()->getSelection();
+ LLRenderMaterialOverrideFunctor override_func(this, url);
+ if (!selected_objects->applyToTEs(&override_func))
+ {
+ mOverrideInProgress = false;
+ }
- // we posted all changes
- mUnsavedChanges = 0;
+ // we posted all changes
+ mUnsavedChanges = 0;
+ }
}
else
{