summaryrefslogtreecommitdiff
path: root/indra/newview/llmaterialeditor.cpp
diff options
context:
space:
mode:
authorAndrey Kleshchev <andreykproductengine@lindenlab.com>2022-10-27 23:06:12 +0300
committerAndrey Kleshchev <andreykproductengine@lindenlab.com>2022-10-27 23:35:46 +0300
commit29062fd90763d6865db514cfc6c012c08f9621e5 (patch)
tree1a18f3c3cbc2a89763c5d78eb6cb83f992cbb9bd /indra/newview/llmaterialeditor.cpp
parente70cf8edfee32d62392008fcba8ea5e7c0dd112f (diff)
SL-18441 "Override" UI cleanup
Diffstat (limited to 'indra/newview/llmaterialeditor.cpp')
-rw-r--r--indra/newview/llmaterialeditor.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/indra/newview/llmaterialeditor.cpp b/indra/newview/llmaterialeditor.cpp
index 6fee65201d..a8b0fdb3c9 100644
--- a/indra/newview/llmaterialeditor.cpp
+++ b/indra/newview/llmaterialeditor.cpp
@@ -227,6 +227,8 @@ LLMaterialEditor::LLMaterialEditor(const LLSD& key)
{
mAssetID = item->getAssetUUID();
}
+ // if this is a 'live editor' instance, it uses live overrides
+ mIsOverride = key.asString() == LIVE_MATERIAL_EDITOR_KEY;
}
void LLMaterialEditor::setObjectID(const LLUUID& object_id)
@@ -293,7 +295,7 @@ BOOL LLMaterialEditor::postBuild()
// Emissive
childSetCommitCallback("emissive color", changes_callback, (void*)&MATERIAL_EMISIVE_COLOR_DIRTY);
- childSetVisible("unsaved_changes", mUnsavedChanges);
+ childSetVisible("unsaved_changes", mUnsavedChanges && !mIsOverride);
getChild<LLUICtrl>("total_upload_fee")->setTextArg("[FEE]", llformat("%d", 0));
@@ -527,7 +529,8 @@ void LLMaterialEditor::resetUnsavedChanges()
void LLMaterialEditor::markChangesUnsaved(U32 dirty_flag)
{
mUnsavedChanges |= dirty_flag;
- childSetVisible("unsaved_changes", mUnsavedChanges);
+ // at the moment live editing (mIsOverride) applies everything 'live'
+ childSetVisible("unsaved_changes", mUnsavedChanges && !mIsOverride);
if (mUnsavedChanges)
{
@@ -1552,7 +1555,6 @@ void LLMaterialEditor::loadLive()
LLMaterialEditor* me = (LLMaterialEditor*)LLFloaterReg::getInstance("material_editor", floater_key);
if (me)
{
- me->mIsOverride = true;
me->setFromSelection();
me->setTitle(me->getString("material_override_title"));
me->childSetVisible("save", false);
@@ -1576,7 +1578,6 @@ void LLMaterialEditor::loadObjectSave()
LLMaterialEditor* me = (LLMaterialEditor*)LLFloaterReg::getInstance("material_editor");
if (me && me->setFromSelection())
{
- me->mIsOverride = false;
me->childSetVisible("save", false);
me->mMaterialName = LLTrans::getString("New Material");
me->setTitle(me->mMaterialName);