- Timestamp:
- 10/29/13 13:47:35 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/Breadcrumbs/HeuristicLab.Core.Views/3.3/ItemCollectionView.cs
r10089 r10093 224 224 var item = (T)itemsListView.SelectedItems[0].Tag; 225 225 var mainForm = MainFormManager.GetMainForm<MainForm.WindowsForms.MainForm>(); 226 var outermostViewHost = mainForm.GetOutermostViewOfType<ViewHost>(this); 227 if (outermostViewHost != null && outermostViewHost.HotlinkingEnabled) { 228 var oldCrumbs = outermostViewHost.Breadcrumbs; 229 var newCrumbs = BuildBreadcrumbTrail(); 230 mainForm.ShowContentInSpecificViewHost(item, outermostViewHost); 231 outermostViewHost.UpdateBreadcrumbTrail(oldCrumbs, newCrumbs.Concat(new[] { item })); 232 } else { 226 var outermostViewHost = mainForm.ShowContentInOutermostViewHost(item, this, true); 227 if (!outermostViewHost.HotlinkingEnabled) { 233 228 if (showDetailsCheckBox.Checked) { 234 229 detailsGroupBox.Enabled = true; … … 256 251 var item = (T)itemsListView.SelectedItems[0].Tag; 257 252 var mainForm = MainFormManager.GetMainForm<MainForm.WindowsForms.MainForm>(); 258 var outermostViewHost = mainForm.GetOutermostViewOfType<ViewHost>(this); 259 var oldCrumbs = outermostViewHost.Breadcrumbs; 260 var newCrumbs = BuildBreadcrumbTrail(); 261 mainForm.ShowContentInSpecificViewHost(item, outermostViewHost); 262 outermostViewHost.UpdateBreadcrumbTrail(oldCrumbs, newCrumbs.Concat(new[] { item })); 253 var outermostViewHost = mainForm.ShowContentInOutermostViewHost(item, this); 263 254 outermostViewHost.ActiveView.ReadOnly = ReadOnly; 264 255 outermostViewHost.ActiveView.Locked = Locked; … … 449 440 } 450 441 } 451 protected virtual IEnumerable<IContent> BuildBreadcrumbTrail() {452 var l = new LinkedList<IContent>();453 for (var control = (Control)this; control != null; control = control.Parent) {454 var vh = control as ViewHost;455 if (vh != null && vh.Content != null)456 l.AddFirst(vh.Content);457 }458 return l;459 }460 442 #endregion 461 443 }
Note: See TracChangeset
for help on using the changeset viewer.