- Timestamp:
- 10/29/13 13:47:35 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/Breadcrumbs/HeuristicLab.Core.Views/3.3/ItemListView.cs
r10089 r10093 245 245 var item = (T)itemsListView.SelectedItems[0].Tag; 246 246 var mainForm = MainFormManager.GetMainForm<MainForm.WindowsForms.MainForm>(); 247 var outermostViewHost = mainForm.GetOutermostViewOfType<ViewHost>(this); 248 if (outermostViewHost != null && outermostViewHost.HotlinkingEnabled) { 249 var oldCrumbs = outermostViewHost.Breadcrumbs; 250 var newCrumbs = BuildBreadcrumbTrail(); 251 mainForm.ShowContentInSpecificViewHost(item, outermostViewHost); 252 outermostViewHost.UpdateBreadcrumbTrail(oldCrumbs, newCrumbs.Concat(new[] { item })); 247 var outermostViewHost = mainForm.ShowContentInOutermostViewHost(item, this, true); 248 if (outermostViewHost.HotlinkingEnabled) { 253 249 outermostViewHost.ActiveView.ReadOnly = ReadOnly; 254 250 outermostViewHost.ActiveView.Locked = Locked; … … 278 274 var item = (T)itemsListView.SelectedItems[0].Tag; 279 275 var mainForm = MainFormManager.GetMainForm<MainForm.WindowsForms.MainForm>(); 280 var outermostViewHost = mainForm.GetOutermostViewOfType<ViewHost>(this); 281 var oldCrumbs = outermostViewHost.Breadcrumbs; 282 var newCrumbs = BuildBreadcrumbTrail(); 283 mainForm.ShowContentInSpecificViewHost(item, outermostViewHost); 284 outermostViewHost.UpdateBreadcrumbTrail(oldCrumbs, newCrumbs.Concat(new[] { item })); 276 var outermostViewHost = mainForm.ShowContentInOutermostViewHost(item, this); 285 277 outermostViewHost.ActiveView.ReadOnly = ReadOnly; 286 278 outermostViewHost.ActiveView.Locked = Locked; … … 516 508 } 517 509 } 518 protected virtual IEnumerable<IContent> BuildBreadcrumbTrail() {519 var l = new LinkedList<IContent>();520 for (var control = (Control)this; control != null; control = control.Parent) {521 var vh = control as ViewHost;522 if (vh != null && vh.Content != null)523 l.AddFirst(vh.Content);524 }525 return l;526 }527 510 #endregion 528 511 }
Note: See TracChangeset
for help on using the changeset viewer.