Add Visible property to IInteractionElement

This commit is contained in:
John Lewin 2019-05-20 10:13:45 -07:00 committed by jlewin
parent 7d3a7ca3db
commit 3bd2eccf9c
3 changed files with 9 additions and 0 deletions

View file

@ -34,6 +34,8 @@ namespace MatterHackers.MeshVisualizer
/// </summary>
public interface IGLInteractionElement : IInteractionElement
{
bool Visible { get; set; }
bool DrawOnTop { get; }
void DrawGlContent(DrawGlContentEventArgs e);

View file

@ -55,6 +55,8 @@ namespace MatterHackers.MeshVisualizer
public bool DrawOnTop { get; protected set; }
public virtual bool Visible { get; set; }
protected bool MouseDownOnControl { get; set; }
public IntersectInfo MouseMoveInfo { get; set; }

View file

@ -603,6 +603,11 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
private void DrawInteractionVolumes(DrawEventArgs e)
{
foreach (var item in this.InteractionVolumes.OfType<IGLInteractionElement>())
{
item.Visible = !SuppressUiVolumes;
}
if (SuppressUiVolumes)
{
return;