Skip to content

Commit

Permalink
Changing & to &&
Browse files Browse the repository at this point in the history
  • Loading branch information
IsakNaslundBh committed May 13, 2022
1 parent d26797e commit 97ac635
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Grasshopper_UI/Render/RenderMaterial.cs
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ public static DisplayMaterial RenderMaterial(DisplayMaterial material, Color cus
{
Color pColour = GH.Instances.ActiveCanvas.Document.PreviewColour;
Color ghColour = material.Diffuse;
if (ghColour.R == pColour.R & // If the color sent by PreviewArgs is the default object PreviewColour
ghColour.G == pColour.G &
if (ghColour.R == pColour.R && // If the color sent by PreviewArgs is the default object PreviewColour
ghColour.G == pColour.G &&
ghColour.B == pColour.B) // Excluding Alpha channel from comparison
{
double transparency = (255 - custom.A) / (double)255;
Expand All @@ -58,8 +58,8 @@ public static DisplayMaterial RenderMaterial(DisplayMaterial material, DisplayMa

Color pColour = GH.Instances.ActiveCanvas.Document.PreviewColour;
Color ghColour = material.Diffuse;
if (ghColour.R == pColour.R & // If the color sent by PreviewArgs is the default object PreviewColour
ghColour.G == pColour.G &
if (ghColour.R == pColour.R && // If the color sent by PreviewArgs is the default object PreviewColour
ghColour.G == pColour.G &&
ghColour.B == pColour.B) // Excluding Alpha channel from comparison
{
return custom;
Expand Down

0 comments on commit 97ac635

Please sign in to comment.