diff --git a/src/App.preference.cs b/src/App.preference.cs index 798a1811..f00d297c 100644 --- a/src/App.preference.cs +++ b/src/App.preference.cs @@ -200,6 +200,7 @@ namespace SourceGit { /// public bool IsSubGroup(string parentId, string subId) { if (string.IsNullOrEmpty(parentId)) return false; + if (parentId == subId) return true; var g = FindGroup(subId); if (g == null) return false; diff --git a/src/Helpers/TreeViewHelper.cs b/src/Helpers/TreeViewHelper.cs index 605fc4f4..441286c9 100644 --- a/src/Helpers/TreeViewHelper.cs +++ b/src/Helpers/TreeViewHelper.cs @@ -254,7 +254,7 @@ namespace SourceGit.Helpers { /// /// /// - private static TreeViewItem FindTreeViewItem(DependencyObject child) { + public static TreeViewItem FindTreeViewItem(DependencyObject child) { if (child == null) return null; if (child is TreeViewItem) return child as TreeViewItem; if (child is TreeView) return null; diff --git a/src/UI/NewPage.xaml b/src/UI/NewPage.xaml index 6d1ca73c..3c443d88 100644 --- a/src/UI/NewPage.xaml +++ b/src/UI/NewPage.xaml @@ -16,7 +16,7 @@ - + @@ -58,7 +58,7 @@ - + @@ -69,25 +69,37 @@ + + + + + + MouseMove="TreeMouseMove" + DragOver="TreeDragOver" + DragEnter="TreeDragEnter" + Drop="TreeDrop">