diff options
| author | jpbruyere <jp.bruyere@hotmail.com> | 2017-02-10 15:54:50 +0100 |
|---|---|---|
| committer | jpbruyere <jp.bruyere@hotmail.com> | 2017-02-10 15:54:50 +0100 |
| commit | 456e7c847a4aa6fed44cc2d970ac9400ea54d0c4 (patch) | |
| tree | 42dc38f31028f3854f55a8203390ed922dd8cd5a /src/GraphicObjects/GraphicObject.cs | |
| parent | 5ca711641d1934adf08d2675641e3f61647f3ffc (diff) | |
TextBox, Label, simpler SVG icon for file sys viewers (improve speed a lot), divers debug and code clean
Diffstat (limited to 'src/GraphicObjects/GraphicObject.cs')
| -rw-r--r-- | src/GraphicObjects/GraphicObject.cs | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/src/GraphicObjects/GraphicObject.cs b/src/GraphicObjects/GraphicObject.cs index e468cce9..7aac41d7 100644 --- a/src/GraphicObjects/GraphicObject.cs +++ b/src/GraphicObjects/GraphicObject.cs @@ -1169,16 +1169,20 @@ namespace Crow #region Mouse handling public virtual bool MouseIsIn(Point m) { - if (!(Visible & isEnabled)) - return false; - if (ScreenCoordinates (Slot).ContainsOrIsEqual (m)) { - Scroller scr = Parent as Scroller; - if (scr == null) { - if (Parent is GraphicObject) - return (Parent as GraphicObject).MouseIsIn (m); - else return true; + try { + if (!(Visible & isEnabled)) + return false; + if (ScreenCoordinates (Slot).ContainsOrIsEqual (m)) { + Scroller scr = Parent as Scroller; + if (scr == null) { + if (Parent is GraphicObject) + return (Parent as GraphicObject).MouseIsIn (m); + else return true; + } + return scr.MouseIsIn (scr.savedMousePos); } - return scr.MouseIsIn (scr.savedMousePos); + } catch (Exception ex) { + return false; } return false; } |