From ba136fc9543865f09a6998b34e3dea2df64626dd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Kon=C3=AD=C4=8Dek?= Date: Sun, 11 Jul 2010 22:30:17 +0000 Subject: [PATCH] ContextActionsPopup (Used by Find derived classes, base classes and overrides) is closed by ESC. git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/trunk@6097 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61 --- .../ContextActions/ContextActionsPopup.cs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/Main/Base/Project/Src/Services/RefactoringService/ContextActions/ContextActionsPopup.cs b/src/Main/Base/Project/Src/Services/RefactoringService/ContextActions/ContextActionsPopup.cs index ac1309ced0..31faf1b0bf 100644 --- a/src/Main/Base/Project/Src/Services/RefactoringService/ContextActions/ContextActionsPopup.cs +++ b/src/Main/Base/Project/Src/Services/RefactoringService/ContextActions/ContextActionsPopup.cs @@ -7,6 +7,8 @@ using System; using System.Windows; using System.Windows.Controls.Primitives; +using System.Windows.Input; + using ICSharpCode.SharpDevelop.Editor; namespace ICSharpCode.SharpDevelop.Refactoring @@ -24,6 +26,13 @@ namespace ICSharpCode.SharpDevelop.Refactoring this.ActionsControl = new ContextActionsControl(); // Close when any action excecuted this.ActionsControl.ActionExecuted += delegate { this.Close(); }; + this.KeyDown += new KeyEventHandler(ContextActionsPopup_KeyDown); + } + + void ContextActionsPopup_KeyDown(object sender, KeyEventArgs e) + { + if (e.Key == Key.Escape) + Close(); } private ContextActionsControl ActionsControl