From 0a1a51a0dd37596d9a06ff4705486babab0b188a Mon Sep 17 00:00:00 2001 From: jpbruyere Date: Tue, 2 May 2017 14:19:38 +0200 Subject: [PATCH] Active only focusable widget --- Templates/Expandable.template | 2 +- src/GraphicObjects/GraphicObject.cs | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/Templates/Expandable.template b/Templates/Expandable.template index 2360063a..c7364806 100755 --- a/Templates/Expandable.template +++ b/Templates/Expandable.template @@ -1,7 +1,7 @@  - + diff --git a/src/GraphicObjects/GraphicObject.cs b/src/GraphicObjects/GraphicObject.cs index d45ed304..370e2816 100644 --- a/src/GraphicObjects/GraphicObject.cs +++ b/src/GraphicObjects/GraphicObject.cs @@ -1497,7 +1497,13 @@ namespace Crow CurrentInterface.ActiveWidget = this; if (this.Focusable && !(Interface.FocusOnHover || currentInterface.focusGiven)) { CurrentInterface.FocusedWidget = this; + CurrentInterface.ActiveWidget = this; currentInterface.focusGiven = true; + if (CurrentInterface.eligibleForDoubleClick == this && CurrentInterface.clickTimer.ElapsedMilliseconds < Interface.DoubleClick) + onMouseDoubleClick (this, e); + else + currentInterface.clickTimer.Restart(); + CurrentInterface.eligibleForDoubleClick = null; } //bubble event to the top GraphicObject p = Parent as GraphicObject; -- 2.47.3