Changeset 13626


Ignore:
Timestamp:
02/19/16 10:15:35 (4 years ago)
Author:
pfleck
Message:

#2579 Synced Names of Problem and ProblemScript for Single- and MultiObjectiveProgrammableProblem.

Location:
trunk/sources/HeuristicLab.Problems.Programmable/3.3
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Problems.Programmable/3.3/MultiObjectiveProgrammableProblem.cs

    r12616 r13626  
    7171    private void RegisterEvents() {
    7272      ProblemScript.ProblemDefinitionChanged += (o, e) => OnProblemDefinitionChanged();
     73      ProblemScript.NameChanged += (o, e) => OnProblemScriptNameChanged();
    7374    }
    7475
     
    8081      OnOperatorsChanged();
    8182      OnReset();
     83    }
     84    protected override void OnNameChanged() {
     85      base.OnNameChanged();
     86      ProblemScript.Name = Name;
     87    }
     88    private void OnProblemScriptNameChanged() {
     89      Name = ProblemScript.Name;
    8290    }
    8391
  • trunk/sources/HeuristicLab.Problems.Programmable/3.3/SingleObjectiveProgrammableProblem.cs

    r12616 r13626  
    7474    private void RegisterEvents() {
    7575      ProblemScript.ProblemDefinitionChanged += (o, e) => OnProblemDefinitionChanged();
     76      ProblemScript.NameChanged += (o, e) => OnProblemScriptNameChanged();
    7677    }
    7778
     
    8384      OnOperatorsChanged();
    8485      OnReset();
     86    }
     87    protected override void OnNameChanged() {
     88      base.OnNameChanged();
     89      ProblemScript.Name = Name;
     90    }
     91    private void OnProblemScriptNameChanged() {
     92      Name = ProblemScript.Name;
    8593    }
    8694
Note: See TracChangeset for help on using the changeset viewer.