diff options
author | Dave Parks <davep@lindenlab.com> | 2022-06-27 09:59:11 -0500 |
---|---|---|
committer | Dave Parks <davep@lindenlab.com> | 2022-06-27 09:59:11 -0500 |
commit | 231c618a844cee26a3779b703c88d8807df872e6 (patch) | |
tree | b5f5e0a1a81c23d79dce07eef65cb92764edb8d9 | |
parent | 63daefb39afba64110a48572ac629c83fb31a7c7 (diff) |
SL-17653 Make changes in material editor apply to selection immediately and enable "apply now" checkbox in color swatches.
-rw-r--r-- | indra/newview/llmaterialeditor.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/indra/newview/llmaterialeditor.cpp b/indra/newview/llmaterialeditor.cpp index e3206947d5..7335669f09 100644 --- a/indra/newview/llmaterialeditor.cpp +++ b/indra/newview/llmaterialeditor.cpp @@ -37,6 +37,7 @@ #include "llviewertexture.h" #include "llselectmgr.h" #include "llvovolume.h" +#include "llcolorswatch.h" #include "tinygltf/tiny_gltf.h" @@ -73,6 +74,7 @@ BOOL LLMaterialEditor::postBuild() // Albedo childSetCommitCallback("albedo color", changes_callback, NULL); + getChild<LLColorSwatchCtrl>("albedo color")->setCanApplyImmediately(TRUE); childSetCommitCallback("transparency", changes_callback, NULL); childSetCommitCallback("alpha mode", changes_callback, NULL); childSetCommitCallback("alpha cutoff", changes_callback, NULL); @@ -87,6 +89,7 @@ BOOL LLMaterialEditor::postBuild() // Emissive childSetCommitCallback("emissive color", changes_callback, NULL); + getChild<LLColorSwatchCtrl>("emissive color")->setCanApplyImmediately(TRUE); childSetVisible("unsaved_changes", mHasUnsavedChanges); @@ -273,6 +276,9 @@ void LLMaterialEditor::setHasUnsavedChanges(bool value) mHasUnsavedChanges = value; childSetVisible("unsaved_changes", value); } + + // HACK -- apply any changes to selection immediately + applyToSelection(); } void LLMaterialEditor::onCommitAlbedoTexture(LLUICtrl * ctrl, const LLSD & data) |