Conditionally highlight render features based on Inspector flag

- Disable rendering until enabled
This commit is contained in:
John Lewin 2019-02-22 22:24:39 -08:00
parent b85d79e774
commit 9866aba124

View file

@ -193,6 +193,8 @@ namespace MatterHackers.GCodeVisualizer
}
}
public bool GCodeInspector { get; set; } = false;
public void Render(Graphics2D graphics2D, GCodeRenderInfo renderInfo)
{
if (renderFeatures.Count > 0)
@ -230,7 +232,7 @@ namespace MatterHackers.GCodeVisualizer
RenderFeatureBase feature = renderFeatures[renderInfo.EndLayerIndex][i];
if (feature != null)
{
feature.Render(graphics2DGl, renderInfo, highlightFeature: i == lastFeature);
feature.Render(graphics2DGl, renderInfo, highlightFeature: this.GCodeInspector && i == lastFeature);
}
}
GL.End();