diff options
| author | jpbruyere <jp.bruyere@hotmail.com> | 2016-03-13 23:42:01 +0100 |
|---|---|---|
| committer | jpbruyere <jp.bruyere@hotmail.com> | 2016-03-13 23:42:01 +0100 |
| commit | ef7100e7fbc137eb7c05032fba0819442f7c7ab7 (patch) | |
| tree | 5667e2626d7afe65554837cc036eacd3c02aca61 /src/GraphicObjects/Popper.cs | |
| parent | e5bb6eaee1d61bdcc60ad0a0fb7e81911bd57e47 (diff) | |
correct popper mouse leave bug
Diffstat (limited to 'src/GraphicObjects/Popper.cs')
| -rw-r--r-- | src/GraphicObjects/Popper.cs | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/GraphicObjects/Popper.cs b/src/GraphicObjects/Popper.cs index 7c068085..746e334b 100644 --- a/src/GraphicObjects/Popper.cs +++ b/src/GraphicObjects/Popper.cs @@ -29,6 +29,7 @@ namespace Crow if (_content != null) { _content.LogicalParent = null; _content.LayoutChanged -= _content_LayoutChanged; + _content.MouseLeave -= onMouseLeave; } _content = value; @@ -38,6 +39,7 @@ namespace Crow _content.LogicalParent = this; _content.LayoutChanged += _content_LayoutChanged; + _content.MouseLeave += onMouseLeave; } } @@ -111,8 +113,14 @@ namespace Crow } public override void onMouseLeave (object sender, MouseMoveEventArgs e) { - IsPopped = false; base.onMouseLeave (sender, e); + if (MouseIsIn (e.Position)) + return; + if (_content == null) + return; + if (_content.MouseIsIn (e.Position)) + return; + IsPopped = false; } #endregion |