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 | e71e23b46e138a5bcd0bbb8f246a910e03893c8e (patch) | |
| tree | d7631587416d043c6072d3dca6b96e49e53da253 /src/GraphicObjects/GraphicObject.cs | |
| parent | 60719330e1ce6dc4516ae502b055be33e0293950 (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) { |