diff options
| author | jpbruyere <jp.bruyere@hotmail.com> | 2015-09-14 12:30:20 +0200 |
|---|---|---|
| committer | jpbruyere <jp.bruyere@hotmail.com> | 2015-09-14 12:30:20 +0200 |
| commit | 42d9e260840d46ab9d960ae45d71dc47a03fb6cf (patch) | |
| tree | faa408edb9857300146ac3666aefd8f0ae60d2f7 /src/OpenTKGameWindow.cs | |
| parent | 4161571104964c0d309b338595e497b78eb54cda (diff) | |
Clear Bindings when GraphicObject is destroyed
Diffstat (limited to 'src/OpenTKGameWindow.cs')
| -rwxr-xr-x | src/OpenTKGameWindow.cs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/OpenTKGameWindow.cs b/src/OpenTKGameWindow.cs index 355ae304..a50a05be 100755 --- a/src/OpenTKGameWindow.cs +++ b/src/OpenTKGameWindow.cs @@ -86,13 +86,16 @@ namespace go public void DeleteWidget(GraphicObject g)
{
g.Visible = false;//trick to ensure clip is added to refresh zone
+ g.ClearBinding();
GraphicObjects.Remove (g);
}
/// <summary> Remove all Graphic objects from top container </summary>
public void ClearInterface()
{
- foreach (GraphicObject g in GraphicObjects)
+ foreach (GraphicObject g in GraphicObjects) {
g.Visible = false;
+ g.ClearBinding ();
+ }
GraphicObjects.Clear ();
}
public void Quit ()
|