Browse Source

Merge pull request #570 from 0xd4d/ilspy-call-ipane-closed-before-overwrite

Call IPane.Closed() before overwriting xxxPane.Content
pull/576/head
Siegfried Pammer 10 years ago
parent
commit
1a82a8df1f
  1. 14
      ILSpy/MainWindow.xaml.cs

14
ILSpy/MainWindow.xaml.cs

@ -835,7 +835,12 @@ namespace ICSharpCode.ILSpy @@ -835,7 +835,12 @@ namespace ICSharpCode.ILSpy
topPaneRow.Height = new GridLength(sessionSettings.TopPaneSplitterPosition, GridUnitType.Star);
}
topPane.Title = title;
topPane.Content = content;
if (topPane.Content != content) {
IPane pane = topPane.Content as IPane;
if (pane != null)
pane.Closed();
topPane.Content = content;
}
topPane.Visibility = Visibility.Visible;
}
@ -860,7 +865,12 @@ namespace ICSharpCode.ILSpy @@ -860,7 +865,12 @@ namespace ICSharpCode.ILSpy
bottomPaneRow.Height = new GridLength(sessionSettings.BottomPaneSplitterPosition, GridUnitType.Star);
}
bottomPane.Title = title;
bottomPane.Content = content;
if (bottomPane.Content != content) {
IPane pane = bottomPane.Content as IPane;
if (pane != null)
pane.Closed();
bottomPane.Content = content;
}
bottomPane.Visibility = Visibility.Visible;
}

Loading…
Cancel
Save