Skip to content

Commit

Permalink
- Fixed symbol lists was not automatically hidden in diff windows
Browse files Browse the repository at this point in the history
  • Loading branch information
wmjordan committed Sep 15, 2021
1 parent 7aa6311 commit 4750d70
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Codist/Controls/ExternalAdornment.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ public ExternalAdornment(IWpfTextView view) {
var grid = view.VisualElement.GetParent<Grid>();
if (grid != null) {
grid.Children.Add(this);
view.Selection.SelectionChanged += ViewSeletionChanged;
view.VisualElement.Unloaded += VisualElement_Unloaded;
}
else {
view.VisualElement.Loaded += VisualElement_Loaded;
Expand All @@ -48,11 +50,9 @@ public void FocusOnTextView() {

public void ClearUnpinnedChildren() {
for (int i = Children.Count - 1; i >= 0; i--) {
var c = Children[i] as SymbolList;
if (c != null && c.IsPinned) {
continue;
if (Children[i] is SymbolList l && l.IsPinned == false) {
Children.RemoveAt(i);
}
Children.RemoveAt(i);
}
}

Expand Down

0 comments on commit 4750d70

Please sign in to comment.