Make sure we don't keep a reference around to widgets through the OnIdle call back.

This commit is contained in:
larsbrubaker 2014-02-27 16:41:52 -08:00
parent 5f72d64f73
commit d72836f3a0
3 changed files with 17 additions and 4 deletions

View file

@ -218,7 +218,10 @@ namespace MatterHackers.MatterControl.ActionBar
}
}
UiThread.RunOnIdle(OnIdle);
if (!WidgetHasBeenClosed)
{
UiThread.RunOnIdle(OnIdle);
}
}
void Instance_WroteLine(object sender, EventArgs e)

View file

@ -76,7 +76,10 @@ namespace MatterHackers.MatterControl
timeSinceLastTextChanged.Stop();
}
UiThread.RunOnIdle(OnIdle);
if (!WidgetHasBeenClosed)
{
UiThread.RunOnIdle(OnIdle);
}
}
void internalTextEditWidget_TextChanged(object sender, EventArgs e)
@ -155,7 +158,10 @@ namespace MatterHackers.MatterControl
timeSinceLastTextChanged.Stop();
}
UiThread.RunOnIdle(OnIdle);
if (!WidgetHasBeenClosed)
{
UiThread.RunOnIdle(OnIdle);
}
}
void internalNumberEdit_TextChanged(object sender, EventArgs e)

View file

@ -122,7 +122,11 @@ namespace MatterHackers.MatterControl
UpdatePrintStatus();
}
UiThread.RunOnIdle(OnIdle);
if (!WidgetHasBeenClosed)
{
UiThread.RunOnIdle(OnIdle);
}
}
private void UpdatePrintStatus()