Merge pull request #5353 from larsbrubaker/main
upgrading nuit and json
This commit is contained in:
commit
39b08fa683
12 changed files with 79 additions and 36 deletions
|
|
@ -16,7 +16,7 @@
|
|||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="System.Management" Version="5.0.0" />
|
||||
<PackageReference Include="System.Management" Version="6.0.0" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@
|
|||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="5.0.0" />
|
||||
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="6.0.0" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@
|
|||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="5.0.0" />
|
||||
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="6.0.0" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
|
|
|||
|
|
@ -135,13 +135,13 @@
|
|||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="CsvHelper">
|
||||
<Version>18.0.0</Version>
|
||||
<Version>27.2.1</Version>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Microsoft.AspNet.WebApi.Client">
|
||||
<Version>5.2.7</Version>
|
||||
<Version>5.2.9</Version>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Mindscape.Raygun4Net">
|
||||
<Version>5.12.0</Version>
|
||||
<Version>5.13.0</Version>
|
||||
</PackageReference>
|
||||
<PackageReference Include="SocketIoClientDotNet">
|
||||
<Version>1.0.2-beta1</Version>
|
||||
|
|
|
|||
|
|
@ -754,6 +754,9 @@ namespace MatterHackers.MatterControl
|
|||
ArrangeAllPartsOperation(),
|
||||
new SceneSelectionSeparator(),
|
||||
LayFlatOperation(),
|
||||
#if DEBUG
|
||||
RebuildOperation(),
|
||||
#endif
|
||||
GroupOperation(),
|
||||
UngroupOperation(),
|
||||
new SceneSelectionSeparator(),
|
||||
|
|
@ -1174,6 +1177,42 @@ namespace MatterHackers.MatterControl
|
|||
};
|
||||
}
|
||||
|
||||
private static SceneOperation RebuildOperation()
|
||||
{
|
||||
return new SceneOperation("Rebuild")
|
||||
{
|
||||
TitleGetter = () => "Rebuild".Localize(),
|
||||
Action = (sceneContext) =>
|
||||
{
|
||||
var scene = sceneContext.Scene;
|
||||
var selectedItem = scene.SelectedItem;
|
||||
if (selectedItem != null)
|
||||
{
|
||||
try
|
||||
{
|
||||
var updateItems = SheetObject3D.SortAndLockUpdateItems(selectedItem.Parent, (item) =>
|
||||
{
|
||||
if (item == selectedItem || item.Parent == selectedItem)
|
||||
{
|
||||
// don't process this
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}, false);
|
||||
|
||||
SheetObject3D.SendInvalidateInRebuildOrder(updateItems, InvalidateType.Properties, null);
|
||||
}
|
||||
catch
|
||||
{
|
||||
}
|
||||
}
|
||||
},
|
||||
HelpTextGetter = () => "At least 1 part must be selected".Localize().Stars(),
|
||||
IsEnabled = (sceneContext) => sceneContext.Scene.SelectedItem != null,
|
||||
Icon = (theme) => StaticData.Instance.LoadIcon("update.png", 16, 16).SetToColor(theme.TextColor).SetPreMultiply(),
|
||||
};
|
||||
}
|
||||
|
||||
private static SceneOperation LinearArrayOperation()
|
||||
{
|
||||
return new SceneOperation("Linear Array")
|
||||
|
|
|
|||
|
|
@ -111,7 +111,7 @@ namespace MatterHackers.MatterControl.DesignTools.Operations
|
|||
|
||||
// process everything else
|
||||
return true;
|
||||
});
|
||||
}, true);
|
||||
|
||||
var runningInterval = SheetObject3D.SendInvalidateInRebuildOrder(updateItems, InvalidateType.Properties);
|
||||
|
||||
|
|
|
|||
|
|
@ -132,7 +132,7 @@ namespace MatterHackers.MatterControl.DesignTools
|
|||
}
|
||||
}
|
||||
|
||||
public static List<UpdateItem> SortAndLockUpdateItems(IObject3D root, Func<IObject3D, bool> includeObject)
|
||||
public static List<UpdateItem> SortAndLockUpdateItems(IObject3D root, Func<IObject3D, bool> includeObject, bool checkForExpression)
|
||||
{
|
||||
var requiredUpdateItems = new Dictionary<IObject3D, UpdateItem>();
|
||||
foreach (var child in root.Descendants())
|
||||
|
|
@ -146,8 +146,8 @@ namespace MatterHackers.MatterControl.DesignTools
|
|||
depthToThis++;
|
||||
parent = parent.Parent;
|
||||
}
|
||||
|
||||
AddItemsRequiringUpdateToDictionary(child, requiredUpdateItems, depthToThis, includeObject);
|
||||
|
||||
AddItemsRequiringUpdateToDictionary(child, requiredUpdateItems, depthToThis, includeObject, checkForExpression);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -181,13 +181,13 @@ namespace MatterHackers.MatterControl.DesignTools
|
|||
}
|
||||
|
||||
return true;
|
||||
});
|
||||
}, true);
|
||||
|
||||
SendInvalidateInRebuildOrder(updateItems, InvalidateType.SheetUpdated, this);
|
||||
}
|
||||
|
||||
public static RunningInterval SendInvalidateInRebuildOrder(List<UpdateItem> updateItems,
|
||||
InvalidateType sheetUpdated,
|
||||
InvalidateType invalidateType,
|
||||
IObject3D sender = null)
|
||||
{
|
||||
// and send the invalidate
|
||||
|
|
@ -214,7 +214,7 @@ namespace MatterHackers.MatterControl.DesignTools
|
|||
updateItem.rebuildLock.Dispose();
|
||||
updateItem.rebuildLock = null;
|
||||
var updateSender = sender == null ? updateItem.item : sender;
|
||||
updateItem.item.Invalidate(new InvalidateArgs(updateSender, sheetUpdated));
|
||||
updateItem.item.Invalidate(new InvalidateArgs(updateSender, invalidateType));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -250,17 +250,21 @@ namespace MatterHackers.MatterControl.DesignTools
|
|||
return runningInterval;
|
||||
}
|
||||
|
||||
private static void AddItemsRequiringUpdateToDictionary(IObject3D inItem, Dictionary<IObject3D, UpdateItem> updatedItems, int inDepth, Func<IObject3D, bool> includeObject)
|
||||
private static void AddItemsRequiringUpdateToDictionary(IObject3D inItem,
|
||||
Dictionary<IObject3D, UpdateItem> updatedItems,
|
||||
int inDepth,
|
||||
Func<IObject3D, bool> includeObject,
|
||||
bool checkForExpression)
|
||||
{
|
||||
// process depth first
|
||||
foreach(var child in inItem.Children)
|
||||
{
|
||||
AddItemsRequiringUpdateToDictionary(child, updatedItems, inDepth + 1, includeObject);
|
||||
AddItemsRequiringUpdateToDictionary(child, updatedItems, inDepth + 1, includeObject, checkForExpression);
|
||||
}
|
||||
|
||||
var depth2 = inDepth;
|
||||
if (includeObject(inItem)
|
||||
&& HasExpressionWithString(inItem, "=", true))
|
||||
&& (!checkForExpression || HasExpressionWithString(inItem, "=", true)))
|
||||
{
|
||||
var itemToAdd = inItem;
|
||||
while (itemToAdd != null
|
||||
|
|
|
|||
|
|
@ -88,27 +88,27 @@
|
|||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="AngleSharp" Version="0.14.0" />
|
||||
<PackageReference Include="CsvHelper" Version="18.0.0" />
|
||||
<PackageReference Include="AngleSharp" Version="0.17.1" />
|
||||
<PackageReference Include="CsvHelper" Version="27.2.1" />
|
||||
<PackageReference Include="Lucene.Net" Version="4.8.0-beta00005" />
|
||||
<PackageReference Include="Lucene.Net.Analysis.Common" Version="4.8.0-beta00005" />
|
||||
<PackageReference Include="Lucene.Net.QueryParser" Version="4.8.0-beta00005" />
|
||||
<PackageReference Include="Markdig" Version="0.15.2" />
|
||||
<PackageReference Include="MathParser.org-mXparser" Version="4.4.2" />
|
||||
<PackageReference Include="Markdig" Version="0.30.2" />
|
||||
<PackageReference Include="MathParser.org-mXparser" Version="5.0.6" />
|
||||
<PackageReference Include="MIConvexHull" Version="1.1.19.1019" />
|
||||
<PackageReference Include="Microsoft.Extensions.Configuration.Binder" Version="5.0.0" />
|
||||
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="5.0.0" />
|
||||
<PackageReference Include="Newtonsoft.Json" Version="12.0.3" />
|
||||
<PackageReference Include="Microsoft.Extensions.Configuration.Binder" Version="6.0.0" />
|
||||
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="6.0.0" />
|
||||
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
|
||||
<PackageReference Include="PDFsharpNetStandard2" Version="1.51.4845" />
|
||||
<PackageReference Include="SocketIOSharp" Version="2.0.3" />
|
||||
<PackageReference Include="System.ComponentModel.Annotations" Version="5.0.0" />
|
||||
<PackageReference Include="System.IO.Packaging" Version="6.0.0" />
|
||||
<PackageReference Include="System.Threading.Tasks.Extensions" Version="4.5.4" />
|
||||
<PackageReference Include="Zeroconf" Version="3.4.2" />
|
||||
<PackageReference Include="Zeroconf" Version="3.6.11" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="5.0.0" />
|
||||
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="6.0.0" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
Subproject commit cce755cd9c356a96edb641ed515113caa6bf6ad3
|
||||
Subproject commit d30433b04424d0af57fa22e0bf8cec077ac41b2a
|
||||
|
|
@ -1 +1 @@
|
|||
Subproject commit 338231d1f1bafe87d200435b065035846e75ca60
|
||||
Subproject commit 4af60a9822345f3bf6800ede7d5b6c6948ea0dc9
|
||||
|
|
@ -42,11 +42,11 @@
|
|||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Newtonsoft.Json" Version="12.0.3" />
|
||||
<PackageReference Include="NUnit" Version="3.11.0" />
|
||||
<PackageReference Include="NUnit.ApplicationDomain" Version="11.1.0" />
|
||||
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
|
||||
<PackageReference Include="NUnit" Version="3.13.3" />
|
||||
<PackageReference Include="NUnit.ApplicationDomain" Version="12.0.0" />
|
||||
<PackageReference Include="NUnit3TestAdapter">
|
||||
<Version>3.12.0</Version>
|
||||
<Version>4.2.1</Version>
|
||||
</PackageReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
|
|
|
|||
|
|
@ -156,11 +156,11 @@
|
|||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="C5" Version="2.5.3" />
|
||||
<PackageReference Include="Newtonsoft.Json" Version="12.0.3" />
|
||||
<PackageReference Include="NUnit" Version="3.11.0" />
|
||||
<PackageReference Include="NUnit.ApplicationDomain" Version="11.1.0" />
|
||||
<PackageReference Include="NUnit3TestAdapter" Version="3.12.0" />
|
||||
<PackageReference Include="C5" Version="3.0.0-rc" />
|
||||
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
|
||||
<PackageReference Include="NUnit" Version="3.13.3" />
|
||||
<PackageReference Include="NUnit.ApplicationDomain" Version="12.0.0" />
|
||||
<PackageReference Include="NUnit3TestAdapter" Version="4.2.1" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="System.Xml" />
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue