Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
12/21/21 15:29:18 (2 years ago)
Author:
dpiringe
Message:

#3136

  • fixed a bug in StructureTemplateView -> only nodes of type SubFunctionTreeNode are selectable
  • added a way to keep old sub functions after parsing a new expression
    • overwrote some basic object methods for SubFunction to keep it simple
    • only old sub functions, which match the name and signature of the new ones, are saved; examples:
      • old: f(x), new: f(x) -> keep old
      • old: f(x1), new: f(x1, x2) -> use new
      • old: f1(x), new f2(x) -> use new
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/3136_Structural_GP/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/StructureTemplate/StructureTemplateView.cs

    r18154 r18164  
    4242    private void SymbolicExpressionTreeNodeClicked(object sender, MouseEventArgs e) {
    4343      var visualTreeNode = sender as VisualTreeNode<ISymbolicExpressionTreeNode>;
    44       if(visualTreeNode != null) {
    45         var subFunctionTreeNode = visualTreeNode.Content as SubFunctionTreeNode;
     44      if(visualTreeNode != null && visualTreeNode.Content is SubFunctionTreeNode subFunctionTreeNode) {
    4645        var selectedSubFunction = Content.SubFunctions.Where(x => x.Name == subFunctionTreeNode.Name).FirstOrDefault();
    4746        if(subFunctionTreeNode != null && selectedSubFunction != null)
Note: See TracChangeset for help on using the changeset viewer.