diff options
author | Vsevolod Kukol <sevoku@xamarin.com> | 2016-05-25 12:22:47 +0300 |
---|---|---|
committer | Vsevolod Kukol <sevoku@xamarin.com> | 2016-05-25 12:22:47 +0300 |
commit | 338d52b78f041c10f64d3ac58f9a517241d76bb0 (patch) | |
tree | 03763f2e572b7c4e35551ca76fa767f146de2b7f /main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.OptionPanels | |
parent | 4a9ea3ad8e4346781ca4428ad47ebe7ef3cd28da (diff) |
[Ide] Optimize key binding selection
Diffstat (limited to 'main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.OptionPanels')
-rw-r--r-- | main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.OptionPanels/KeyBindingsPanel.cs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.OptionPanels/KeyBindingsPanel.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.OptionPanels/KeyBindingsPanel.cs index a52a622158..6440d168f5 100644 --- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.OptionPanels/KeyBindingsPanel.cs +++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.OptionPanels/KeyBindingsPanel.cs @@ -785,11 +785,11 @@ namespace MonoDevelop.Ide.Gui.OptionPanels [GLib.ConnectBefore ()] void HandleKeyTreeButtonPressEvent (object o, ButtonPressEventArgs args) { + if (KeyBindingSelected == null) + return; var hit = HitTest (args.Event.X, args.Event.Y); - if (!hit.ButtonBounds.IsEmpty && KeyBindingSelected != null) { - var a = new KeyBindingSelectedEventArgs (hit.AllKeys, hit.SelectedKey, hit.Command, hit.Iter); - KeyBindingSelected (this, a); - } + var a = new KeyBindingSelectedEventArgs (hit.AllKeys, hit.SelectedKey, hit.Command, hit.Iter); + KeyBindingSelected (this, a); } KeyBindingHitTestResult HitTest (double mouseX, double mouseY) |