Changed ReadOnly to use Buffers

This commit is contained in:
LarsBrubaker 2019-06-29 07:57:01 -07:00 committed by jlewin
parent 58e77cfe60
commit 3824583acd
3 changed files with 6 additions and 4 deletions

View file

@ -40,10 +40,11 @@ namespace MatterHackers.MatterControl
{
var imageWidget = new ImageWidget(image);
var index = 0;
this.Children.ReadOnly((list) =>
using (var list = this.Children.ReadOnly())
{
index = list.IndexOf(labelTextWidget);
});
}
this.AddChild(imageWidget, index);
imageWidget.Margin = new BorderDouble(8, 5);