Free cookie consent management tool by TermsFeed Policy Generator

Changeset 423


Ignore:
Timestamp:
08/02/08 11:32:52 (16 years ago)
Author:
gkronber
Message:

quick fix for #163 (Changing the FunctionLibrary in a VariableInjector has no effect on the injected FunctionLibrary)

Location:
trunk/sources/HeuristicLab.StructureIdentification
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.StructureIdentification/GPOperatorGroup.cs

    r186 r423  
    9898      }
    9999
    100       RecalculateAllowedSuboperators();
    101       RecalculateMinimalTreeBounds();
     100      //RecalculateAllowedSuboperators();
     101      //RecalculateMinimalTreeBounds();
    102102
    103103      OnOperatorAdded(op);
     
    291291      op.RemoveVariable(GPOperatorLibrary.ALLOWED_SUBOPERATORS);
    292292      op.RemoveVariable(GPOperatorLibrary.TICKETS);
    293 
    294293      OnOperatorRemoved(op);
    295294    }
     
    312311      }
    313312    }
     313
     314    internal void Prepare() {
     315      RecalculateAllowedSuboperators();
     316      RecalculateMinimalTreeBounds();
     317    }
    314318  }
    315319
  • trunk/sources/HeuristicLab.StructureIdentification/GPOperatorLibrary.cs

    r177 r423  
    8787
    8888    #endregion
     89
     90    internal void Prepare() {
     91      GPOperatorGroup.Prepare();
     92    }
    8993  }
    9094}
  • trunk/sources/HeuristicLab.StructureIdentification/GPOperatorLibraryEditor.Designer.cs

    r2 r423  
    5454      this.mutationTabPage = new System.Windows.Forms.TabPage();
    5555      this.mutationSplitContainer = new System.Windows.Forms.SplitContainer();
     56      this.mutationListView = new System.Windows.Forms.ListView();
    5657      this.mutationVariableView = new HeuristicLab.Core.VariableView();
    57       this.mutationListView = new System.Windows.Forms.ListView();
     58      this.preprocessButton = new System.Windows.Forms.Button();
    5859      this.tabControl.SuspendLayout();
    5960      this.operatorLibraryTabPage.SuspendLayout();
     
    9394      // operatorLibraryTabPage
    9495      //
     96      this.operatorLibraryTabPage.Controls.Add(this.preprocessButton);
    9597      this.operatorLibraryTabPage.Controls.Add(this.operatorLibraryEditor);
    9698      this.operatorLibraryTabPage.Location = new System.Drawing.Point(4, 22);
     
    178180      this.mutationSplitContainer.SplitterDistance = 221;
    179181      this.mutationSplitContainer.TabIndex = 0;
    180       //
    181       // mutationVariableView
    182       //
    183       this.mutationVariableView.Caption = "Variable";
    184       this.mutationVariableView.Dock = System.Windows.Forms.DockStyle.Fill;
    185       this.mutationVariableView.Location = new System.Drawing.Point(0, 0);
    186       this.mutationVariableView.Name = "mutationVariableView";
    187       this.mutationVariableView.Size = new System.Drawing.Size(438, 529);
    188       this.mutationVariableView.TabIndex = 0;
    189       this.mutationVariableView.Variable = null;
    190182      //
    191183      // mutationListView
     
    200192      this.mutationListView.View = System.Windows.Forms.View.List;
    201193      this.mutationListView.SelectedIndexChanged += new System.EventHandler(this.mutationListView_SelectedIndexChanged);
     194      //
     195      // mutationVariableView
     196      //
     197      this.mutationVariableView.Caption = "Variable";
     198      this.mutationVariableView.Dock = System.Windows.Forms.DockStyle.Fill;
     199      this.mutationVariableView.Location = new System.Drawing.Point(0, 0);
     200      this.mutationVariableView.Name = "mutationVariableView";
     201      this.mutationVariableView.Size = new System.Drawing.Size(438, 529);
     202      this.mutationVariableView.TabIndex = 0;
     203      this.mutationVariableView.Variable = null;
     204      //
     205      // preprocessButton
     206      //
     207      this.preprocessButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
     208      this.preprocessButton.Location = new System.Drawing.Point(440, 509);
     209      this.preprocessButton.Name = "preprocessButton";
     210      this.preprocessButton.Size = new System.Drawing.Size(75, 23);
     211      this.preprocessButton.TabIndex = 1;
     212      this.preprocessButton.Text = "Prepare";
     213      this.preprocessButton.UseVisualStyleBackColor = true;
     214      this.preprocessButton.Click += new System.EventHandler(this.preprocessButton_Click);
    202215      //
    203216      // GPOperatorLibraryEditor
     
    235248    private System.Windows.Forms.ListView initListView;
    236249    private System.Windows.Forms.ListView mutationListView;
     250    private System.Windows.Forms.Button preprocessButton;
    237251  }
    238252}
  • trunk/sources/HeuristicLab.StructureIdentification/GPOperatorLibraryEditor.cs

    r2 r423  
    150150      }
    151151    }
     152
     153    private void preprocessButton_Click(object sender, EventArgs e) {
     154      ((GPOperatorLibrary)OperatorLibrary).Prepare();
     155    }
    152156  }
    153157}
Note: See TracChangeset for help on using the changeset viewer.