Free cookie consent management tool by TermsFeed Policy Generator

Changeset 4158


Ignore:
Timestamp:
08/04/10 19:16:46 (13 years ago)
Author:
mkommend
Message:

corrected the creation of new views (ticket #1132)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.MainForm.WindowsForms/3.3/ViewHost.cs

    r4103 r4158  
    173173          view.ReadOnly = this.ReadOnly;
    174174          view.Locked = this.Locked;
     175          ActiveView = view; //necessary to allow the views to change the status of the viewhost
    175176          view.Content = Content;
    176177          cachedViews.Add(viewType, view);
     
    178179          if (c != null)
    179180            this.Controls.Add(c);
    180         }
     181        } else
     182          ActiveView = cachedViews[viewType];
    181183        UpdateActiveMenuItem();
    182         ActiveView = cachedViews[viewType];
    183184      }
    184185    }
     
    192193        this.ActiveViewControl.Anchor = AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Top | AnchorStyles.Right;
    193194        this.ActiveViewControl.Size = new System.Drawing.Size(this.Width - this.viewsLabel.Width - this.viewsLabel.Margin.Left - this.viewsLabel.Margin.Right, this.Height);
    194         this.ActiveViewChanged();
    195195      }
    196196      this.ResumeRepaint(true);
     
    214214      if (ActiveView != null) {
    215215        this.Caption = this.ActiveView.Caption;
     216        this.ReadOnly = this.ActiveView.ReadOnly;
    216217        this.Locked = this.ActiveView.Locked;
    217218      }
Note: See TracChangeset for help on using the changeset viewer.