Browse Source

fix http://community.sharpdevelop.net/forums/t/15618.aspx - do not dispose change watcher in ChangeMarkerMargin - it could be used by two different margins (in two synchronized text editors, for ex. split view)

pull/6/merge
Siegfried Pammer 13 years ago
parent
commit
bf23572925
  1. 1
      src/AddIns/DisplayBindings/AvalonEdit.AddIn/Src/ChangeMarkerMargin.cs
  2. 2
      src/AddIns/DisplayBindings/AvalonEdit.AddIn/Src/CodeEditor.cs

1
src/AddIns/DisplayBindings/AvalonEdit.AddIn/Src/ChangeMarkerMargin.cs

@ -39,7 +39,6 @@ namespace ICSharpCode.AvalonEdit.AddIn
{ {
if (!disposed) { if (!disposed) {
changeWatcher.ChangeOccurred -= ChangeOccurred; changeWatcher.ChangeOccurred -= ChangeOccurred;
changeWatcher.Dispose();
disposed = true; disposed = true;
} }
} }

2
src/AddIns/DisplayBindings/AvalonEdit.AddIn/Src/CodeEditor.cs

@ -610,6 +610,8 @@ namespace ICSharpCode.AvalonEdit.AddIn
if (errorPainter != null) if (errorPainter != null)
errorPainter.Dispose(); errorPainter.Dispose();
if (changeWatcher != null)
changeWatcher.Dispose();
this.Document = null; this.Document = null;
DisposeTextEditor(primaryTextEditor); DisposeTextEditor(primaryTextEditor);
if (secondaryTextEditor != null) if (secondaryTextEditor != null)

Loading…
Cancel
Save