aboutsummaryrefslogtreecommitdiffstatsci
path: root/src/GraphicObjects
diff options
context:
space:
mode:
authorjpbruyere <jp.bruyere@hotmail.com>2017-04-19 09:59:39 +0200
committerjpbruyere <jp.bruyere@hotmail.com>2017-04-19 09:59:39 +0200
commitd83f78d3787b9dc035130ebb6e056b6e2f0ca788 (patch)
treead64a7a7900b63bc07392c54c2d5c56917dd3545 /src/GraphicObjects
parent75424623f5a1d65581e6e911d0d00403c8fab814 (diff)
check if HoverWidget is removed from graphic tree
Diffstat (limited to 'src/GraphicObjects')
-rw-r--r--src/GraphicObjects/Group.cs7
-rw-r--r--src/GraphicObjects/PrivateContainer.cs5
2 files changed, 12 insertions, 0 deletions
diff --git a/src/GraphicObjects/Group.cs b/src/GraphicObjects/Group.cs
index d4b5b62e..549ca219 100644
--- a/src/GraphicObjects/Group.cs
+++ b/src/GraphicObjects/Group.cs
@@ -75,6 +75,13 @@ namespace Crow
{
child.LayoutChanged -= OnChildLayoutChanges;
//child.Parent = null;
+
+ //check if HoverWidget is removed from Tree
+ if (CurrentInterface.HoverWidget != null) {
+ if (this.Contains (CurrentInterface.HoverWidget))
+ CurrentInterface.HoverWidget = null;
+ }
+
lock (children)
Children.Remove(child);
diff --git a/src/GraphicObjects/PrivateContainer.cs b/src/GraphicObjects/PrivateContainer.cs
index 65eacabb..4076b5ec 100644
--- a/src/GraphicObjects/PrivateContainer.cs
+++ b/src/GraphicObjects/PrivateContainer.cs
@@ -53,6 +53,11 @@ namespace Crow
{
if (child != null) {
+ //check if HoverWidget is removed from Tree
+ if (CurrentInterface.HoverWidget != null) {
+ if (this.Contains (CurrentInterface.HoverWidget))
+ CurrentInterface.HoverWidget = null;
+ }
contentSize = new Size (0, 0);
child.LayoutChanged -= OnChildLayoutChanges;
child.Parent = null;