Restoring Image Converter creating

This commit is contained in:
Lars Brubaker 2022-03-02 16:15:43 -08:00
parent 3e3fc7d8d8
commit 9e76e1c771
3 changed files with 5 additions and 4 deletions

View file

@ -132,7 +132,7 @@ namespace MatterHackers.MatterControl.Library
var object3D = await collector?.Invoke();
// If the content has not set a color, we'll assign from the running ColorRange
if (object3D.Color == Color.Transparent)
if (object3D?.Color == Color.Transparent)
{
object3D.Color = this.Color;
}

View file

@ -30,6 +30,7 @@ either expressed or implied, of the FreeBSD Project.
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Threading.Tasks;
using MatterHackers.Agg.Platform;
using MatterHackers.DataConverters3D;
@ -135,7 +136,8 @@ namespace MatterHackers.MatterControl.Library
SceneOperations.ById("ImageConverter").Action(bedConfig);
// Return replacement object constructed in ImageConverter operation
var constructedComponent = tempScene.SelectedItem;
var constructedComponent = tempScene.Children.LastOrDefault();
tempScene.SelectedItem = constructedComponent;
tempScene.Children.Remove(constructedComponent);
return Task.FromResult(constructedComponent);