aboutsummaryrefslogtreecommitdiffstatsci
path: root/src/Interface.cs
diff options
context:
space:
mode:
authorjpbruyere <jp.bruyere@hotmail.com>2016-08-31 12:26:16 +0200
committerjpbruyere <jp.bruyere@hotmail.com>2016-09-01 12:44:39 +0200
commit8d1e0c98e1efac4f9ee133634251a48fa6547ce6 (patch)
tree3553d3999ae82e16936cbb07d51067559affc38c /src/Interface.cs
parente68f66a334bd37c60416615d8314a62dd9d05740 (diff)
debug mouse leave, move recursive test back into interface instead of go.MouseLeave
Menu IsOpen handling MenuItem Open and Close events
Diffstat (limited to 'src/Interface.cs')
-rw-r--r--src/Interface.cs22
1 files changed, 18 insertions, 4 deletions
diff --git a/src/Interface.cs b/src/Interface.cs
index 73f44a6a..d01d2e8f 100644
--- a/src/Interface.cs
+++ b/src/Interface.cs
@@ -572,8 +572,15 @@ namespace Crow
int i = 0;
while (i < idxhw) {
if (GraphicTree [i].MouseIsIn (e.Position)) {
- //set evtarg to null to force mouseLeave without checking mouse pos
- HoverWidget.onMouseLeave (HoverWidget, null);
+ while (HoverWidget != null) {
+ if (HoverWidget is Popper) {
+ if ((HoverWidget as Popper).Content == GraphicTree[i])
+ break;
+ }
+ HoverWidget.onMouseLeave (HoverWidget, e);
+ HoverWidget = HoverWidget.LogicalParent as GraphicObject;
+ }
+
GraphicTree [i].checkHoverWidget (e);
return true;
}
@@ -587,8 +594,15 @@ namespace Crow
return true;
} else {
HoverWidget.onMouseLeave (HoverWidget, e);
- if (HoverWidget != null)
- return true;
+ //seek upward from last focused graph obj's
+ while (HoverWidget.LogicalParent as GraphicObject != null) {
+ HoverWidget = HoverWidget.LogicalParent as GraphicObject;
+ if (HoverWidget.MouseIsIn (e.Position)) {
+ HoverWidget.checkHoverWidget (e);
+ return true;
+ } else
+ HoverWidget.onMouseLeave (HoverWidget, e);
+ }
}
}