diff --git a/UVtools.Core/Layers/MainIssue.cs b/UVtools.Core/Layers/MainIssue.cs index 9a5801b..14ca0dd 100644 --- a/UVtools.Core/Layers/MainIssue.cs +++ b/UVtools.Core/Layers/MainIssue.cs @@ -11,7 +11,6 @@ using System.Collections; using System.Collections.Generic; using System.Drawing; using System.Linq; -using MoreLinq; using UVtools.Core.Extensions; namespace UVtools.Core.Layers @@ -125,7 +124,7 @@ namespace UVtools.Core.Layers BoundingRectangle = boundingRectangle; Area = area; - Childs = issues.ToArray(); + Childs = issues.OrderBy(issue => issue.LayerIndex).ToArray(); Sort(); } diff --git a/UVtools.Core/Managers/IssueManager.cs b/UVtools.Core/Managers/IssueManager.cs index e61eab5..265b845 100644 --- a/UVtools.Core/Managers/IssueManager.cs +++ b/UVtools.Core/Managers/IssueManager.cs @@ -151,7 +151,7 @@ namespace UVtools.Core.Managers List GetResult() { - return result.OrderBy(issue => issue.Type).ThenBy(issue => issue.StartLayerIndex).ThenByDescending(issue => issue.Area).ToList(); + return result.OrderBy(mainIssue => mainIssue.Type).ThenBy(issue => issue.StartLayerIndex).ThenByDescending(issue => issue.Area).ToList(); } void GenerateAirMap(IInputArray input, IInputOutputArray output, VectorOfVectorOfPoint externals) @@ -968,10 +968,7 @@ namespace UVtools.Core.Managers var mainIssue = new MainIssue(MainIssue.IssueType.SuctionCup, group); if ((decimal)mainIssue.TotalHeight >= resinTrapConfig.RequiredHeightToConsiderSuctionCup) { AddIssue(mainIssue); - } else - { - mainIssue = null; - } + } } } }); diff --git a/UVtools.WPF/Assets/Styles/Styles.xaml b/UVtools.WPF/Assets/Styles/Styles.xaml index e38012e..fc27179 100644 --- a/UVtools.WPF/Assets/Styles/Styles.xaml +++ b/UVtools.WPF/Assets/Styles/Styles.xaml @@ -111,6 +111,14 @@ + + + +