summaryrefslogtreecommitdiff
path: root/indra/newview/llpanelface.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llpanelface.cpp')
-rw-r--r--indra/newview/llpanelface.cpp28
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