aboutsummaryrefslogtreecommitdiffstatsci
path: root/src/OpenTKGameWindow.cs
diff options
context:
space:
mode:
authorjpbruyere <jp.bruyere@hotmail.com>2015-09-14 12:30:20 +0200
committerjpbruyere <jp.bruyere@hotmail.com>2015-09-14 12:30:20 +0200
commit42d9e260840d46ab9d960ae45d71dc47a03fb6cf (patch)
treefaa408edb9857300146ac3666aefd8f0ae60d2f7 /src/OpenTKGameWindow.cs
parent4161571104964c0d309b338595e497b78eb54cda (diff)
Clear Bindings when GraphicObject is destroyed
Diffstat (limited to 'src/OpenTKGameWindow.cs')
-rwxr-xr-xsrc/OpenTKGameWindow.cs5
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 ()