Made the calibration cubes have instructions
Description Object can have clickable links Markdown widget keeps its size correctly Printer connection switches to disconnected when com port lost Fixed material temp
This commit is contained in:
parent
a2ffbcf38c
commit
619d2b63cc
7 changed files with 34 additions and 8 deletions
|
|
@ -34,6 +34,7 @@ using System.Linq;
|
|||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using Markdig.Agg;
|
||||
using Markdig.Renderers.Agg.Inlines;
|
||||
using MatterHackers.Agg;
|
||||
using MatterHackers.Agg.Platform;
|
||||
using MatterHackers.Agg.UI;
|
||||
|
|
@ -268,6 +269,8 @@ namespace MatterHackers.MatterControl.DesignTools
|
|||
if (markdownWidget.Markdown != description)
|
||||
{
|
||||
markdownWidget.Markdown = description;
|
||||
|
||||
FixSelectableBasedOnLinks(markdownWidget);
|
||||
}
|
||||
|
||||
markdownWidget.Width = width;
|
||||
|
|
@ -298,6 +301,24 @@ namespace MatterHackers.MatterControl.DesignTools
|
|||
graphics2DOpenGL.RenderTransformedPath(transform, new Ellipse(0, 0, 5, 5), theme.PrimaryAccentColor, false);
|
||||
}
|
||||
|
||||
private void FixSelectableBasedOnLinks(MarkdownWidget markdownWidget)
|
||||
{
|
||||
if (markdownWidget.Descendants<TextLinkX>().Any())
|
||||
{
|
||||
foreach (var child in markdownWidget.Children)
|
||||
{
|
||||
child.Selectable = true;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
foreach (var child in markdownWidget.Children)
|
||||
{
|
||||
child.Selectable = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public AxisAlignedBoundingBox GetEditorWorldspaceAABB(Object3DControlsLayer layer)
|
||||
{
|
||||
return AxisAlignedBoundingBox.Empty();
|
||||
|
|
@ -328,17 +349,15 @@ namespace MatterHackers.MatterControl.DesignTools
|
|||
markdownWidget.Markdown = Description;
|
||||
markdownWidget.Width = width;
|
||||
markdownWidget.ScrollArea.VAnchor = VAnchor.Fit | VAnchor.Center;
|
||||
foreach (var child in markdownWidget.Children)
|
||||
{
|
||||
child.Selectable = false;
|
||||
}
|
||||
|
||||
FixSelectableBasedOnLinks(markdownWidget);
|
||||
|
||||
controlLayer.GuiSurface.AddChild(markdownWidget);
|
||||
controlLayer.GuiSurface.AfterDraw += GuiSurface_AfterDraw;
|
||||
markdownWidget.MouseDown += MarkdownWidget_MouseDown;
|
||||
markdownWidget.MouseMove += MarkdownWidget_MouseMove;
|
||||
markdownWidget.MouseUp += MarkdownWidget_MouseUp;
|
||||
markdownWidget.KeyDown += MarkdownWidget_KeyDown; ;
|
||||
markdownWidget.KeyDown += MarkdownWidget_KeyDown;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue