Clean up more evals that have local variables are not working correctly.

This commit is contained in:
Jeff Hutchinson 2021-09-12 15:05:19 -04:00
parent a30f64506f
commit 7556e403e7
6 changed files with 27 additions and 29 deletions

View file

@ -1420,15 +1420,13 @@ function MaterialSelector::updateSelection( %this, %material, %previewImagePath
// after we move away from the material. eg: if we remove a field from the material,
// the empty checkbox will still be there until you move fro and to the material again
%isMaterialBorder = 0;
eval("%isMaterialBorder = isObject(MaterialSelector-->"@%material@"Border);");
%isMaterialBorder = eval("return isObject(MaterialSelector-->"@%material@"Border);");
if( %isMaterialBorder )
{
eval( "MaterialSelector-->"@%material@"Border.setStateOn(1);");
}
%isMaterialBorderPrevious = 0;
eval("%isMaterialBorderPrevious = isObject(MaterialSelector-->"@$prevSelectedMaterialHL@"Border);");
%isMaterialBorderPrevious = eval("return isObject(MaterialSelector-->"@$prevSelectedMaterialHL@"Border);");
if( %isMaterialBorderPrevious )
{
eval( "MaterialSelector-->"@$prevSelectedMaterialHL@"Border.setStateOn(0);");