NORSPEC-80 Fix for mask cutoff UI showing up in Shininess context

meow-7.2.2
Dave Parks 2013-04-04 00:22:29 -05:00
parent 57b371ab9b
commit 8a73610997
1 changed files with 9 additions and 1 deletions

View File

@ -1957,8 +1957,16 @@ void LLPanelFace::updateAlphaControls(LLUICtrl* ctrl, void* userdata)
{
return;
}
LLComboBox* comboMaterials = self->getChild<LLComboBox>("combobox mattype");
if (!comboMaterials)
{
return;
}
U32 alpha_value = comboAlphaMode->getCurrentIndex();
bool show_alphactrls = (alpha_value == ALPHAMODE_MASK); // Alpha masking
U32 mattype = comboMaterials->getCurrentIndex();
bool show_alphactrls = (alpha_value == ALPHAMODE_MASK) && (mattype == 0); // Alpha masking
self->getChildView("label maskcutoff")->setVisible(show_alphactrls);
self->getChildView("maskcutoff")->setVisible(show_alphactrls);
}