summaryrefslogtreecommitdiff
path: root/indra/newview/llfloatermodelpreview.cpp
diff options
context:
space:
mode:
authorandreykproductengine <andreykproductengine@lindenlab.com>2019-05-02 23:06:59 +0300
committerandreykproductengine <andreykproductengine@lindenlab.com>2019-05-02 23:06:59 +0300
commit99ab1ccf9365bc74eec7503c21c904b6317f0af0 (patch)
treebc534b530c72668e1591ff26528d644cd2b88449 /indra/newview/llfloatermodelpreview.cpp
parent219944d14e4c08bf6291f792b2b37b99362812f2 (diff)
SL-4186 Mesh model rename before upload shows old model name on rez
Diffstat (limited to 'indra/newview/llfloatermodelpreview.cpp')
-rw-r--r--indra/newview/llfloatermodelpreview.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/indra/newview/llfloatermodelpreview.cpp b/indra/newview/llfloatermodelpreview.cpp
index 4f1ea4a89e..cb58cfdd0a 100644
--- a/indra/newview/llfloatermodelpreview.cpp
+++ b/indra/newview/llfloatermodelpreview.cpp
@@ -325,6 +325,8 @@ BOOL LLFloaterModelPreview::postBuild()
childSetCommitCallback("import_scale", onImportScaleCommit, this);
childSetCommitCallback("pelvis_offset", onPelvisOffsetCommit, this);
+ getChild<LLLineEditor>("description_form")->setKeystrokeCallback(boost::bind(&LLFloaterModelPreview::onDescriptionKeystroke, this, _1), NULL);
+
getChild<LLCheckBoxCtrl>("show_edges")->setCommitCallback(boost::bind(&LLFloaterModelPreview::onViewOptionChecked, this, _1));
getChild<LLCheckBoxCtrl>("show_physics")->setCommitCallback(boost::bind(&LLFloaterModelPreview::onViewOptionChecked, this, _1));
getChild<LLCheckBoxCtrl>("show_textures")->setCommitCallback(boost::bind(&LLFloaterModelPreview::onViewOptionChecked, this, _1));
@@ -520,6 +522,16 @@ void LLFloaterModelPreview::onClickCalculateBtn()
mUploadBtn->setEnabled(false);
}
+void LLFloaterModelPreview::onDescriptionKeystroke(LLUICtrl* ctrl)
+{
+ // Workaround for SL-4186, server doesn't allow name changes after 'calculate' stage
+ LLLineEditor* input = static_cast<LLLineEditor*>(ctrl);
+ if (input->isDirty()) // dirty will be reset after commit
+ {
+ toggleCalculateButton(true);
+ }
+}
+
//static
void LLFloaterModelPreview::onImportScaleCommit(LLUICtrl*,void* userdata)
{