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:
Lars Brubaker 2022-04-01 16:07:07 -07:00
parent a2ffbcf38c
commit 619d2b63cc
7 changed files with 34 additions and 8 deletions

View file

@ -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;
}
}

View file

@ -1757,7 +1757,7 @@ Make sure that your printer is turned on. Some printers will appear to be connec
}
Console.WriteLine("Exiting ReadFromPrinter method: " + CommunicationState.ToString());
if (CommunicationState == CommunicationStates.Connected)
if (CommunicationState != CommunicationStates.Disconnecting)
{
// we are in an error condition where we have lost the com port
CommunicationState = CommunicationStates.Disconnected;

View file

@ -94,7 +94,14 @@ namespace Markdig.Agg
this.AddChild(contentPanel);
}
public void LoadUri(Uri uri, HelpArticle sourceArticle = null)
public override void OnSizeChanged(EventArgs e)
{
contentPanel.Height = contentPanel.Height - 1;
base.OnSizeChanged(e);
}
public void LoadUri(Uri uri, HelpArticle sourceArticle = null)
{
try
{

View file

Before

Width:  |  Height:  |  Size: 2.9 KiB

After

Width:  |  Height:  |  Size: 2.9 KiB

Before After
Before After

View file

@ -22,7 +22,7 @@
"max_fan_speed_layer_time": "60",
"min_fan_speed": "60",
"min_fan_speed_layer_time": "180",
"temperature": "220"
"temperature": "215"
}
],
"OemLayer": null,