Make sure we don't keep a reference around to widgets through the OnIdle call back.
This commit is contained in:
parent
5f72d64f73
commit
d72836f3a0
3 changed files with 17 additions and 4 deletions
|
|
@ -218,7 +218,10 @@ namespace MatterHackers.MatterControl.ActionBar
|
|||
}
|
||||
}
|
||||
|
||||
UiThread.RunOnIdle(OnIdle);
|
||||
if (!WidgetHasBeenClosed)
|
||||
{
|
||||
UiThread.RunOnIdle(OnIdle);
|
||||
}
|
||||
}
|
||||
|
||||
void Instance_WroteLine(object sender, EventArgs e)
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -122,7 +122,11 @@ namespace MatterHackers.MatterControl
|
|||
UpdatePrintStatus();
|
||||
|
||||
}
|
||||
UiThread.RunOnIdle(OnIdle);
|
||||
|
||||
if (!WidgetHasBeenClosed)
|
||||
{
|
||||
UiThread.RunOnIdle(OnIdle);
|
||||
}
|
||||
}
|
||||
|
||||
private void UpdatePrintStatus()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue