diff options
Diffstat (limited to 'indra/newview/llmaterialeditor.cpp')
-rw-r--r-- | indra/newview/llmaterialeditor.cpp | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/indra/newview/llmaterialeditor.cpp b/indra/newview/llmaterialeditor.cpp index 533f882d39..c10625a45a 100644 --- a/indra/newview/llmaterialeditor.cpp +++ b/indra/newview/llmaterialeditor.cpp @@ -1513,13 +1513,14 @@ void LLMaterialEditor::loadMaterialFromFile(const std::string& filename, S32 ind ); } } + void LLMaterialEditor::onSelectionChanged() { // This won't get deletion or deselectAll() // Might need to handle that separately - mUnsavedChanges = 0; clearTextures(); setFromSelection(); + // At the moment all cahges are 'live' so don't reset dirty flags // saveLiveValues(); todo } @@ -1554,6 +1555,21 @@ void LLMaterialEditor::saveLiveValues() LLSelectMgr::getInstance()->getSelection()->applyToObjects(&savefunc); } +void LLMaterialEditor::updateLive() +{ + const LLSD floater_key(LIVE_MATERIAL_EDITOR_KEY); + LLFloater* instance = LLFloaterReg::findInstance("material_editor", floater_key); + if (instance && LLFloater::isVisible(instance)) + { + LLMaterialEditor* me = (LLMaterialEditor*)instance; + if (me) + { + me->clearTextures(); + me->setFromSelection(); + } + } +} + void LLMaterialEditor::loadLive() { // Allow only one 'live' instance @@ -2164,6 +2180,9 @@ void LLMaterialEditor::applyToSelection() // 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); selected_objects->applyToTEs(&override_func); + + // we posted all changes + mUnsavedChanges = 0; } else { |