aboutsummaryrefslogtreecommitdiffstatsci
path: root/src/GraphicObjects/Window.cs
diff options
context:
space:
mode:
authorJean-Philippe Bruyère <jp_bruyere@hotmail.com>2017-08-28 05:10:21 +0200
committerJean-Philippe Bruyère <jp_bruyere@hotmail.com>2017-08-28 05:10:21 +0200
commit8642854fc8690a60234c33dffa8d3dc77d8d5f1f (patch)
tree859591fe2b4cd3a8011f9cc14f000490c28007dc /src/GraphicObjects/Window.cs
parent94708b811f5f256300453588027fe54550236b6d (diff)
test parent type when trying to close windowIDisposableUnstable
Diffstat (limited to 'src/GraphicObjects/Window.cs')
-rw-r--r--src/GraphicObjects/Window.cs7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/GraphicObjects/Window.cs b/src/GraphicObjects/Window.cs
index e0c97ea9..176e8d90 100644
--- a/src/GraphicObjects/Window.cs
+++ b/src/GraphicObjects/Window.cs
@@ -391,7 +391,12 @@ namespace Crow
protected void close(){
Closing.Raise (this, null);
- currentInterface.DeleteWidget (this);
+ if (Parent is Interface)
+ (Parent as Interface).DeleteWidget (this);
+ else if (Parent is Group)
+ (Parent as Group).RemoveChild (this);
+ else if (Parent is PrivateContainer)
+ (Parent as Container).Child = null;
}
}
}