diff options
| author | Roy Ben-Shabat <Roy@Twine-s.com> | 2019-02-07 17:44:48 +0200 |
|---|---|---|
| committer | Roy Ben-Shabat <Roy@Twine-s.com> | 2019-02-07 17:44:48 +0200 |
| commit | 340de72c8da0c0a5a661664f7fa26f756e43a15a (patch) | |
| tree | e93c61298d27eccec6908b8d9f556e7544a38c6c /Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views | |
| parent | 2a21fe4c9ac87cceed96a03d5ff5ff1aa0d64016 (diff) | |
| download | Tango-340de72c8da0c0a5a661664f7fa26f756e43a15a.tar.gz Tango-340de72c8da0c0a5a661664f7fa26f756e43a15a.zip | |
Improved bug reporting in machine studio.
Diffstat (limited to 'Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views')
| -rw-r--r-- | Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/ReportIssueView.xaml.cs | 31 |
1 files changed, 0 insertions, 31 deletions
diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/ReportIssueView.xaml.cs b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/ReportIssueView.xaml.cs index b6e701841..e17ed7d93 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/ReportIssueView.xaml.cs +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/ReportIssueView.xaml.cs @@ -64,36 +64,5 @@ namespace Tango.MachineStudio.UI.Views i.IsExpanded = true; } } - - static TreeViewItem GetTreeViewItem(ItemsControl parent, object item, bool isExpanded) - { - if (item is TreeViewItem tvi) - return tvi; - - var result = ContainerFromItem(parent, item); - if (result == null && isExpanded) - { - parent.UpdateLayout(); - result = ContainerFromItem(parent, item); - } - return result; - } - - static TreeViewItem ContainerFromItem(ItemsControl parent, object item) => (TreeViewItem)parent.ItemContainerGenerator.ContainerFromItem(item); - - void SelectTreeViewItem(TreeView treeView, TreeViewItem Item) - { - Item.IsExpanded = Item.DataContext == areaCombo.SelectedItem; - - foreach (var item in Item.Items) - { - var i = GetTreeViewItem(treeView, item, false); - - i.IsExpanded = i.DataContext == areaCombo.SelectedItem; - - if (i.HasItems) - SelectTreeViewItem(treeView, i); - } - } } } |
