Restore source objects when canceled
This commit is contained in:
parent
8581974115
commit
3bcb36eaab
2 changed files with 17 additions and 1 deletions
|
|
@ -129,6 +129,22 @@ namespace MatterHackers.MatterControl.PartPreviewWindow.View3D
|
|||
try
|
||||
{
|
||||
Combine(cancellationTokenSource.Token, reporter);
|
||||
|
||||
if (cancellationToken.IsCancellationRequested)
|
||||
{
|
||||
// the combine was canceled set our children to the source object children
|
||||
SourceContainer.Visible = true;
|
||||
RemoveAllButSource();
|
||||
Children.Modify((list) =>
|
||||
{
|
||||
foreach (var child in SourceContainer.Children)
|
||||
{
|
||||
list.Add(child);
|
||||
}
|
||||
});
|
||||
|
||||
SourceContainer.Visible = false;
|
||||
}
|
||||
}
|
||||
catch
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
Subproject commit 1d16b11a1d3eb375996808be4ae174e98600edf6
|
||||
Subproject commit 4ecb3ed94a016319fb137e9f6b938c12bc7d6703
|
||||
Loading…
Add table
Add a link
Reference in a new issue