From 5c1144c48b8183140ed414e455bcbc4f952747e7 Mon Sep 17 00:00:00 2001 From: Graham Madarasz Date: Mon, 10 Jun 2013 19:06:19 -0700 Subject: NORSPEC-222 fix issues with removing the use texture item selecting weave when the TE was BUMPY_TEXTURE, but no normal map was applied --- indra/newview/llpanelface.cpp | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) (limited to 'indra') diff --git a/indra/newview/llpanelface.cpp b/indra/newview/llpanelface.cpp index cfb505b620..4fd55e1cf2 100755 --- a/indra/newview/llpanelface.cpp +++ b/indra/newview/llpanelface.cpp @@ -747,8 +747,15 @@ void LLPanelFace::updateUI() LLUUID norm_map_id = getCurrentNormalMap(); LLCtrlSelectionInterface* combobox_bumpiness = childGetSelectionInterface("combobox bumpiness"); if (combobox_bumpiness) - { - combobox_bumpiness->selectNthItem((S32)bumpy); + { + if ((bumpy == BUMPY_TEXTURE) && !norm_map_id.isNull()) + { + combobox_bumpiness->selectNthItem((S32)BUMPY_TEXTURE); + } + else + { + combobox_bumpiness->selectNthItem((S32)((bumpy < BUMPY_TEXTURE) ? bumpy : 0)); + } } else { @@ -1600,6 +1607,7 @@ void LLPanelFace::updateShinyControls(bool is_setting_texture, bool mess_with_sh if (comboShiny->itemExists(USE_TEXTURE)) { comboShiny->remove(SHINY_TEXTURE); + comboShiny->selectFirstItem(); } } } @@ -1650,9 +1658,8 @@ void LLPanelFace::updateBumpyControls(bool is_setting_texture, bool mess_with_co { if (comboBumpy->itemExists(USE_TEXTURE)) { - // HACK: This depends on adding the "Use texture" - // item at the end of a list of known length. comboBumpy->remove(BUMPY_TEXTURE); + comboBumpy->selectFirstItem(); } } } -- cgit v1.2.3