Conditionally highlight render features based on Inspector flag
- Disable rendering until enabled
This commit is contained in:
parent
b85d79e774
commit
9866aba124
1 changed files with 3 additions and 1 deletions
|
|
@ -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();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue