Browse Source

Fix history navigation when debugging.

pull/191/merge
Eusebiu Marcu 16 years ago
parent
commit
8ae3a56148
  1. 3
      Debugger/ILSpy.Debugger/AvalonEdit/TextMarkerService.cs
  2. 17
      ILSpy/MainWindow.xaml.cs

3
Debugger/ILSpy.Debugger/AvalonEdit/TextMarkerService.cs

@ -90,7 +90,8 @@ namespace ILSpy.Debugger.AvalonEdit
public void Remove(ITextMarker marker) public void Remove(ITextMarker marker)
{ {
if (marker == null) if (marker == null)
throw new ArgumentNullException("marker"); return;
TextMarker m = marker as TextMarker; TextMarker m = marker as TextMarker;
if (markers.Remove(m)) { if (markers.Remove(m)) {
Redraw(m); Redraw(m);

17
ILSpy/MainWindow.xaml.cs

@ -400,8 +400,10 @@ namespace ICSharpCode.ILSpy
// jump to type & expand folding // jump to type & expand folding
if (CurrentLineBookmark.Instance != null) { if (CurrentLineBookmark.Instance != null) {
JumpToReference(CurrentLineBookmark.Instance.Type); if (CurrentLineBookmark.Instance.Type != DebuggedData.CurrentType) {
decompilerTextView.UnfoldAndScroll(CurrentLineBookmark.Instance.LineNumber); JumpToReference(CurrentLineBookmark.Instance.Type);
decompilerTextView.UnfoldAndScroll(CurrentLineBookmark.Instance.LineNumber);
}
} }
} }
@ -429,13 +431,9 @@ namespace ICSharpCode.ILSpy
void AttachToProcessExecuted(object sender, ExecutedRoutedEventArgs e) void AttachToProcessExecuted(object sender, ExecutedRoutedEventArgs e)
{ {
if (!CurrentDebugger.IsDebugging) { if (!CurrentDebugger.IsDebugging) {
var window = new AttachToProcessWindow(); var window = new AttachToProcessWindow { Owner = this };
window.Owner = this; if (window.ShowDialog() == true) {
if (window.ShowDialog() == true) this.StartDebugging(window.SelectedProcess);
{
if (CurrentDebugger.IsDebugging) {
this.StartDebugging(window.SelectedProcess);
}
} }
} }
} }
@ -536,6 +534,7 @@ namespace ICSharpCode.ILSpy
void AboutClick(object sender, RoutedEventArgs e) void AboutClick(object sender, RoutedEventArgs e)
{ {
treeView.UnselectAll();
AboutPage.Display(decompilerTextView); AboutPage.Display(decompilerTextView);
} }
#endregion #endregion

Loading…
Cancel
Save