- Timestamp:
- 05/12/10 14:05:05 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.MainForm.WindowsForms/3.3/ViewHost.cs
r3730 r3795 66 66 } 67 67 ActiveViewChanged(); 68 OnViewTypeChanged();69 68 } 70 69 } … … 109 108 110 109 Type defaultViewType = MainFormManager.GetDefaultViewType(Content.GetType()); 111 if (!ViewCanShowContent(viewType, Content) || defaultViewType != this.ViewType) {110 if (!ViewCanShowContent(viewType, Content)) { 112 111 cachedViews.Clear(); 113 ViewType = defaultViewType; 114 if ((viewType == null) && (viewContextMenuStrip.Items.Count > 0)) // create first available view if default view is not available 115 ViewType = (Type)viewContextMenuStrip.Items[0].Tag; 112 if (defaultViewType == null) { 113 if (viewContextMenuStrip.Items.Count > 0) // create first available view if default view is not available 114 ViewType = (Type)viewContextMenuStrip.Items[0].Tag; 115 } else if (defaultViewType != this.ViewType) 116 ViewType = defaultViewType; 116 117 } 117 118 UpdateActiveMenuItem(); … … 242 243 243 244 private void viewsLabel_DoubleClick(object sender, EventArgs e) { 244 IContentView view = MainFormManager.GetMainForm<MainForm>().ShowContent(this.Content, this.ViewType);245 IContentView view = MainFormManager.GetMainForm<MainForm>().ShowContent(this.Content, this.ViewType); 245 246 if (view != null) { 246 247 view.ReadOnly = this.ReadOnly;
Note: See TracChangeset
for help on using the changeset viewer.