optimize<WorkingCopy>: clear selection after WorkingCopy unloaded

This commit is contained in:
leo 2024-02-27 18:51:57 +08:00
parent 2aacec75b4
commit 91ef4e44a4

View file

@ -13,6 +13,10 @@ namespace SourceGit.Views {
protected override void OnUnloaded(RoutedEventArgs e) { protected override void OnUnloaded(RoutedEventArgs e) {
var vm = DataContext as ViewModels.WorkingCopy; var vm = DataContext as ViewModels.WorkingCopy;
vm.SelectedStagedChange = null;
vm.SelectedStagedTreeNode = null;
vm.SelectedUnstagedChange = null;
vm.SelectedUnstagedTreeNode = null;
vm.SetDetail(null, false); vm.SetDetail(null, false);
base.OnUnloaded(e); base.OnUnloaded(e);