Resolve leak due to lambda, use existing listener
This commit is contained in:
parent
7f64d12dc0
commit
7cea4f67ba
1 changed files with 3 additions and 3 deletions
|
|
@ -147,9 +147,6 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
|
|||
|
||||
this.Scene.Invalidated += Scene_Invalidated;
|
||||
|
||||
// if the scene is invalidated invalidate the widget
|
||||
Scene.Invalidated += (s, e) => Invalidate();
|
||||
|
||||
this.AnchorAll();
|
||||
|
||||
TrackballTumbleWidget.TransformState = TrackBallTransformType.Rotation;
|
||||
|
|
@ -1823,6 +1820,9 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
|
|||
{
|
||||
UiThread.RunOnIdle(this.RebuildTree);
|
||||
}
|
||||
|
||||
// Invalidate widget on scene invalidate
|
||||
this.Invalidate();
|
||||
}
|
||||
|
||||
private void Scene_SelectionChanged(object sender, EventArgs e)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue