Browse Source

Call IPane.Closed() before overwriting xxxPane.Content

pull/570/head
de4dot 11 years ago
parent
commit
23e0a71877
  1. 14
      ILSpy/MainWindow.xaml.cs

14
ILSpy/MainWindow.xaml.cs

@ -835,7 +835,12 @@ namespace ICSharpCode.ILSpy
topPaneRow.Height = new GridLength(sessionSettings.TopPaneSplitterPosition, GridUnitType.Star); topPaneRow.Height = new GridLength(sessionSettings.TopPaneSplitterPosition, GridUnitType.Star);
} }
topPane.Title = title; 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; topPane.Visibility = Visibility.Visible;
} }
@ -860,7 +865,12 @@ namespace ICSharpCode.ILSpy
bottomPaneRow.Height = new GridLength(sessionSettings.BottomPaneSplitterPosition, GridUnitType.Star); bottomPaneRow.Height = new GridLength(sessionSettings.BottomPaneSplitterPosition, GridUnitType.Star);
} }
bottomPane.Title = title; 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; bottomPane.Visibility = Visibility.Visible;
} }

Loading…
Cancel
Save