diff options
author | Oz Linden <oz@lindenlab.com> | 2017-03-06 14:31:51 -0500 |
---|---|---|
committer | Oz Linden <oz@lindenlab.com> | 2017-03-06 14:31:51 -0500 |
commit | 61bddc22d97150cd590bc4184355133b6dd3ff87 (patch) | |
tree | 59b488c8c4edc51096338fab153d9eaf837d27fe /indra/newview/llpanelface.cpp | |
parent | a18d4df6c742aa397b70e4dafb41475bd201a558 (diff) | |
parent | 08ed7f676f2ce38937a03c2a4e823e3564981264 (diff) |
merge changes for 5.0.2-release
Diffstat (limited to 'indra/newview/llpanelface.cpp')
-rw-r--r-- | indra/newview/llpanelface.cpp | 28 |
1 files changed, 24 insertions, 4 deletions
diff --git a/indra/newview/llpanelface.cpp b/indra/newview/llpanelface.cpp index ec2d37c30d..ad600358dd 100644 --- a/indra/newview/llpanelface.cpp +++ b/indra/newview/llpanelface.cpp @@ -649,7 +649,7 @@ void LLPanelFace::getState() updateUI(); } -void LLPanelFace::updateUI() +void LLPanelFace::updateUI(bool force_set_values /*false*/) { //set state of UI to match state of texture entry(ies) (calls setEnabled, setValue, etc, but NOT setVisible) LLViewerObject* objectp = LLSelectMgr::getInstance()->getSelection()->getFirstObject(); @@ -1025,7 +1025,14 @@ void LLPanelFace::updateUI() getChildView("shinyScaleV")->setEnabled(editable && specmap_id.notNull()); getChildView("bumpyScaleV")->setEnabled(editable && normmap_id.notNull()); - getChild<LLUICtrl>("TexScaleV")->setValue(diff_scale_t); + if (force_set_values) + { + getChild<LLSpinCtrl>("TexScaleV")->forceSetValue(diff_scale_t); + } + else + { + getChild<LLSpinCtrl>("TexScaleV")->setValue(diff_scale_t); + } getChild<LLUICtrl>("shinyScaleV")->setValue(norm_scale_t); getChild<LLUICtrl>("bumpyScaleV")->setValue(spec_scale_t); @@ -1235,8 +1242,17 @@ void LLPanelFace::updateUI() BOOL repeats_tentative = !identical_repeats; getChildView("rptctrl")->setEnabled(identical_planar_texgen ? FALSE : enabled); - getChild<LLUICtrl>("rptctrl")->setValue(editable ? repeats : 1.0f); - getChild<LLUICtrl>("rptctrl")->setTentative(LLSD(repeats_tentative)); + LLSpinCtrl* rpt_ctrl = getChild<LLSpinCtrl>("rptctrl"); + if (force_set_values) + { + //onCommit, previosly edited element updates related ones + rpt_ctrl->forceSetValue(editable ? repeats : 1.0f); + } + else + { + rpt_ctrl->setValue(editable ? repeats : 1.0f); + } + rpt_ctrl->setTentative(LLSD(repeats_tentative)); } } @@ -1974,6 +1990,8 @@ void LLPanelFace::onCommitTextureInfo( LLUICtrl* ctrl, void* userdata ) { LLPanelFace* self = (LLPanelFace*) userdata; self->sendTextureInfo(); + // vertical scale and repeats per meter depends on each other, so force set on changes + self->updateUI(true); } // Commit the number of repeats per meter @@ -2038,6 +2056,8 @@ void LLPanelFace::onCommitRepeatsPerMeter(LLUICtrl* ctrl, void* userdata) llassert(false); break; } + // vertical scale and repeats per meter depends on each other, so force set on changes + self->updateUI(true); } struct LLPanelFaceSetMediaFunctor : public LLSelectedTEFunctor |