Browse Source

clicking anywhere in the DecompilerTextView should clear the reference highlight (#553)

pull/569/head
Siegfried Pammer 10 years ago
parent
commit
9524b9cfb5
  1. 2
      ILSpy/Properties/AssemblyInfo.template.cs
  2. 7
      ILSpy/TextView/DecompilerTextView.cs

2
ILSpy/Properties/AssemblyInfo.template.cs

@ -35,7 +35,7 @@ using System.Runtime.InteropServices; @@ -35,7 +35,7 @@ using System.Runtime.InteropServices;
internal static class RevisionClass
{
public const string Major = "2";
public const string Minor = "2";
public const string Minor = "3";
public const string Build = "0";
public const string Revision = "$INSERTREVISION$";
public const string VersionName = null;

7
ILSpy/TextView/DecompilerTextView.cs

@ -94,6 +94,7 @@ namespace ICSharpCode.ILSpy.TextView @@ -94,6 +94,7 @@ namespace ICSharpCode.ILSpy.TextView
textEditor.Options.RequireControlModifierForHyperlinkClick = false;
textEditor.TextArea.TextView.MouseHover += TextViewMouseHover;
textEditor.TextArea.TextView.MouseHoverStopped += TextViewMouseHoverStopped;
textEditor.TextArea.TextView.MouseDown += TextViewMouseDown;
textEditor.SetBinding(Control.FontFamilyProperty, new Binding { Source = DisplaySettingsPanel.CurrentDisplaySettings, Path = new PropertyPath("SelectedFont") });
textEditor.SetBinding(Control.FontSizeProperty, new Binding { Source = DisplaySettingsPanel.CurrentDisplaySettings, Path = new PropertyPath("SelectedFontSize") });
@ -582,6 +583,12 @@ namespace ICSharpCode.ILSpy.TextView @@ -582,6 +583,12 @@ namespace ICSharpCode.ILSpy.TextView
MainWindow.Instance.JumpToReference(reference);
}
void TextViewMouseDown(object sender, MouseButtonEventArgs e)
{
if (GetReferenceSegmentAtMousePosition() == null)
ClearLocalReferenceMarks();
}
void ClearLocalReferenceMarks()
{
foreach (var mark in localReferenceMarks) {

Loading…
Cancel
Save