Free cookie consent management tool by TermsFeed Policy Generator

Changeset 5956


Ignore:
Timestamp:
04/05/11 16:30:07 (14 years ago)
Author:
mkommend
Message:

#1464: Corrected behavior of ViewHost and SymbolicExpressionTreeChart.

Location:
trunk/sources
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views/3.4/SymbolicExpressionTreeChart.cs

    r5809 r5956  
    106106    protected override void OnResize(EventArgs e) {
    107107      base.OnResize(e);
    108       if (this.Width == 0 || this.Height == 0)
     108      if (this.Width <= 1 || this.Height <= 1)
    109109        this.image = new Bitmap(1, 1);
    110110      else
  • trunk/sources/HeuristicLab.MainForm.WindowsForms/3.3/Controls/ViewHost.Designer.cs

    r5463 r5956  
    8080      // viewContextMenuStrip
    8181      //
    82       this.viewContextMenuStrip.IgnoredViewTypes = System.Linq.Enumerable.Empty<System.Type>();
     82      this.viewContextMenuStrip.IgnoredViewTypes = System.Type.EmptyTypes;
    8383      this.viewContextMenuStrip.Item = null;
    8484      this.viewContextMenuStrip.Name = "viewContextMenuStrip";
  • trunk/sources/HeuristicLab.MainForm.WindowsForms/3.3/Controls/ViewHost.cs

    r5837 r5956  
    7575
    7676          if (activeView != null) {
    77             #region disposed cachedView
     77            #region dispose cachedView
    7878            if (activeView != cachedView) {
    7979              if (cachedView != null) cachedView.Content = null;  //needed to deregister events
     
    9393            if (view != null) {
    9494              view.Visible = true;
    95               view.Anchor = AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Top | AnchorStyles.Right;
    96               view.Size = new Size(Width - this.viewsLabel.Width - this.viewsLabel.Margin.Left - this.viewsLabel.Margin.Right, this.Height);
    97               view.Dock = viewsLabelVisible ? DockStyle.None : DockStyle.Fill;
     95              if (ViewsLabelVisible) {
     96                view.Anchor = AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Top | AnchorStyles.Right;
     97                view.Size = new Size(Width - this.viewsLabel.Width - this.viewsLabel.Margin.Left - this.viewsLabel.Margin.Right, this.Height);
     98              } else view.Dock = DockStyle.Fill;
     99              if (!Controls.Contains((view))) Controls.Add(view);
    98100              view.OnShown(new ViewShownEventArgs(view, false));
    99               if (!Controls.Contains((view))) Controls.Add(view);
    100101            }
    101102          } else viewType = null;
Note: See TracChangeset for help on using the changeset viewer.