From: jpbruyere Date: Tue, 2 May 2017 12:19:38 +0000 (+0200) Subject: Active only focusable widget X-Git-Url: https://git.osiis.dedyn.io/?a=commitdiff_plain;h=0a1a51a0dd37596d9a06ff4705486babab0b188a;p=jp%2Fcrow.git Active only focusable widget --- 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;