aboutsummaryrefslogtreecommitdiffstatsci
path: root/src/GraphicObjects
diff options
context:
space:
mode:
Diffstat (limited to 'src/GraphicObjects')
-rw-r--r--src/GraphicObjects/GraphicObject.cs13
-rw-r--r--src/GraphicObjects/Label.cs7
2 files changed, 18 insertions, 2 deletions
diff --git a/src/GraphicObjects/GraphicObject.cs b/src/GraphicObjects/GraphicObject.cs
index 15730905..f0e8a04d 100644
--- a/src/GraphicObjects/GraphicObject.cs
+++ b/src/GraphicObjects/GraphicObject.cs
@@ -1553,6 +1553,9 @@ namespace Crow
MouseMove.Raise (this, e);
}
public virtual void onMouseDown(object sender, MouseButtonEventArgs e){
+ #if DEBUG_FOCUS
+ Debug.WriteLine("MOUSE DOWN => " + this.ToString());
+ #endif
if (CurrentInterface.eligibleForDoubleClick == this && CurrentInterface.clickTimer.ElapsedMilliseconds < Interface.DoubleClick)
onMouseDoubleClick (this, e);
else
@@ -1578,6 +1581,10 @@ namespace Crow
MouseDown.Raise (this, e);
}
public virtual void onMouseUp(object sender, MouseButtonEventArgs e){
+ #if DEBUG_FOCUS
+ Debug.WriteLine("MOUSE UP => " + this.ToString());
+ #endif
+
if (IsDragged){
bool dropOK = false;
if (CurrentInterface.HoverWidget!=null) {
@@ -1604,12 +1611,18 @@ namespace Crow
}
}
public virtual void onMouseClick(object sender, MouseButtonEventArgs e){
+ #if DEBUG_FOCUS
+ Debug.WriteLine("CLICK => " + this.ToString());
+ #endif
GraphicObject p = focusParent;
if (p != null)
p.onMouseClick(sender,e);
MouseClick.Raise (this, e);
}
public virtual void onMouseDoubleClick(object sender, MouseButtonEventArgs e){
+ #if DEBUG_FOCUS
+ Debug.WriteLine("DOUBLE CLICK => " + this.ToString());
+ #endif
GraphicObject p = focusParent;
if (p != null)
p.onMouseDoubleClick(sender,e);
diff --git a/src/GraphicObjects/Label.cs b/src/GraphicObjects/Label.cs
index de7b7f51..ea68fde0 100644
--- a/src/GraphicObjects/Label.cs
+++ b/src/GraphicObjects/Label.cs
@@ -740,7 +740,8 @@ namespace Crow
public override void onMouseUp (object sender, MouseButtonEventArgs e)
{
base.onMouseUp (sender, e);
-
+ if (!(this.HasFocus || _selectable))
+ return;
if (!SelectionInProgress)
return;
@@ -751,7 +752,9 @@ namespace Crow
public override void onMouseDoubleClick (object sender, MouseButtonEventArgs e)
{
base.onMouseDoubleClick (sender, e);
-
+ if (!(this.HasFocus || _selectable))
+ return;
+
GotoWordStart ();
SelBegin = CurrentPosition;
GotoWordEnd ();