diff options
| author | Jean-Philippe Bruyère <jp_bruyere@hotmail.com> | 2018-02-15 18:55:30 +0100 |
|---|---|---|
| committer | Jean-Philippe Bruyère <jp_bruyere@hotmail.com> | 2018-02-15 18:55:30 +0100 |
| commit | 09b6b33cfd7716e7235a925bff87b6fd0c91f260 (patch) | |
| tree | 0c8ca455463a92cf7bec94704c973c1974f589d6 /src/GraphicObjects/GraphicObject.cs | |
| parent | c1b29a565bdbf37fd88d268588710ce8f4f84d5b (diff) | |
code clean
Diffstat (limited to 'src/GraphicObjects/GraphicObject.cs')
| -rw-r--r-- | src/GraphicObjects/GraphicObject.cs | 33 |
1 files changed, 3 insertions, 30 deletions
diff --git a/src/GraphicObjects/GraphicObject.cs b/src/GraphicObjects/GraphicObject.cs index ad9392b0..dd7efbe2 100644 --- a/src/GraphicObjects/GraphicObject.cs +++ b/src/GraphicObjects/GraphicObject.cs @@ -1516,42 +1516,15 @@ namespace Crow public virtual bool PointIsIn(ref Point m) { if (!(Visible & isEnabled)||IsDragged) - return false; - ILayoutable tmp = Parent; - //while (tmp != null){ + return false; if (!parent.PointIsIn(ref m)) return false; m -= (parent.getSlot().Position + parent.ClientRectangle.Position) ; - return Slot.ContainsOrIsEqual (m); } public virtual bool MouseIsIn(Point m) - { - Point p = m; - return PointIsIn (ref m); -// try { -// if (!(Visible & isEnabled)||IsDragged) -// return false; -// ILayoutable tmp = Parent; -// //while (tmp != null){ -// if (!parent.MouseIsIn(m)) -// return false; -// m -= (parent.getSlot().Position + parent.ClientRectangle.Position) ; -// -// return slot.ContainsOrIsEqual (m); -//// Scroller scr = tmp as Scroller; -//// if (scr != null) { -//// m.Y += scr.ScrollY; -//// m.X += scr.ScrollX; -//// } -//// tmp = tmp.Parent; -// //} -// -// //} -// } catch (Exception ex) { -// return false; -// } - //return false; + { + return (!(Visible & isEnabled)||IsDragged) ? false : PointIsIn (ref m); } public virtual void checkHoverWidget(MouseMoveEventArgs e) { |