- Timestamp:
- 10/28/13 17:50:31 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/Breadcrumbs/HeuristicLab.MainForm.WindowsForms/3.3/Controls/ViewHost.cs
r10042 r10089 58 58 } 59 59 60 public bool HotlinkingEnabled { get; set; } 61 60 62 private IContentView cachedView; 61 63 private IContentView activeView; … … 130 132 } 131 133 132 private bool isOut mostViewHost;134 private bool isOutermostViewHost; 133 135 public IEnumerable<IContent> Breadcrumbs { get { return breadcrumbControl.Breadcrumbs; } } 134 136 … … 210 212 } 211 213 private void ViewHost_VisibleChanged(object sender, EventArgs e) { 212 PerformOuter ViewHostDetection();214 PerformOutermostViewHostDetection(); 213 215 } 214 216 private void viewContextMenuStrip_ShowBreadcrumbsChanged(object sender, EventArgs e) { … … 375 377 } 376 378 377 private void PerformOuterViewHostDetection() { 378 var outmostViewHost = this; 379 for (var parent = Parent; parent != null; parent = parent.Parent) { 380 var vh = parent as ViewHost; 381 if (vh != null) outmostViewHost = vh; 382 } 383 isOutmostViewHost = outmostViewHost == this; 384 viewContextMenuStrip.ShowBreadcrumbsToolStripMenuItem.Checked = isOutmostViewHost; 379 private void PerformOutermostViewHostDetection() { 380 var mainForm = MainFormManager.GetMainForm<MainForm>(); 381 var outermostViewHost = mainForm.GetOutermostViewOfType<ViewHost>(this); 382 isOutermostViewHost = outermostViewHost == this; 383 viewContextMenuStrip.ShowBreadcrumbsToolStripMenuItem.Checked = isOutermostViewHost; 385 384 } 386 385 #endregion
Note: See TracChangeset
for help on using the changeset viewer.