Skip to content

Commit 56ec95d

Browse files
committed
Fix scale values not updating if they were focused and you used repeats per meter
1 parent 1970390 commit 56ec95d

File tree

1 file changed

+20
-7
lines changed

1 file changed

+20
-7
lines changed

indra/newview/llpanelface.cpp

Lines changed: 20 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1456,9 +1456,18 @@ void LLPanelFace::updateUI(bool force_set_values /*false*/)
14561456
spec_scale_s = editable ? spec_scale_s : 1.0f;
14571457
spec_scale_s *= identical_planar_texgen ? 2.0f : 1.0f;
14581458

1459-
mTexScaleU->setValue(diff_scale_s);
1460-
mShinyScaleU->setValue(spec_scale_s);
1461-
mBumpyScaleU->setValue(norm_scale_s);
1459+
if (force_set_values)
1460+
{
1461+
mTexScaleU->forceSetValue(diff_scale_s);
1462+
mShinyScaleU->forceSetValue(spec_scale_s);
1463+
mBumpyScaleU->forceSetValue(norm_scale_s);
1464+
}
1465+
else
1466+
{
1467+
mTexScaleU->setValue(diff_scale_s);
1468+
mShinyScaleU->setValue(spec_scale_s);
1469+
mBumpyScaleU->setValue(norm_scale_s);
1470+
}
14621471

14631472
mTexScaleU->setEnabled(editable && has_material);
14641473
mShinyScaleU->setEnabled(editable && has_material && specmap_id.notNull());
@@ -1506,13 +1515,16 @@ void LLPanelFace::updateUI(bool force_set_values /*false*/)
15061515
if (force_set_values)
15071516
{
15081517
mTexScaleV->forceSetValue(diff_scale_t);
1518+
mShinyScaleV->forceSetValue(spec_scale_t);
1519+
mBumpyScaleV->forceSetValue(norm_scale_t);
15091520
}
15101521
else
15111522
{
15121523
mTexScaleV->setValue(diff_scale_t);
1524+
mShinyScaleV->setValue(spec_scale_t);
1525+
mBumpyScaleV->setValue(norm_scale_t);
15131526
}
1514-
mShinyScaleV->setValue(spec_scale_t);
1515-
mBumpyScaleV->setValue(norm_scale_t);
1527+
15161528

15171529
mTexScaleV->setTentative(LLSD(diff_scale_tentative));
15181530
mShinyScaleV->setTentative(LLSD(spec_scale_tentative));
@@ -4838,8 +4850,9 @@ void LLPanelFace::setMaterialOverridesFromSelection()
48384850
}
48394851
}
48404852

4841-
mPBRScaleU->setValue(transform.mScale[VX]);
4842-
mPBRScaleV->setValue(transform.mScale[VY]);
4853+
// Force set scales just in case they were set by repeats per meter and their spinner is focused
4854+
mPBRScaleU->forceSetValue(transform.mScale[VX]);
4855+
mPBRScaleV->forceSetValue(transform.mScale[VY]);
48434856
mPBRRotate->setValue(transform.mRotation * RAD_TO_DEG);
48444857
mPBROffsetU->setValue(transform.mOffset[VX]);
48454858
mPBROffsetV->setValue(transform.mOffset[VY]);

0 commit comments

Comments
 (0)