Free cookie consent management tool by TermsFeed Policy Generator

Changeset 4713


Ignore:
Timestamp:
11/03/10 02:04:09 (14 years ago)
Author:
abeham
Message:

#922

  • fixed a cloning bug in Engine and Scope
Location:
branches/CloningRefactoring/HeuristicLab.Core/3.3
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/CloningRefactoring/HeuristicLab.Core/3.3/Engine.cs

    r4668 r4713  
    5858      if (original.ExecutionState == ExecutionState.Started) throw new InvalidOperationException(string.Format("Clone not allowed in execution state \"{0}\".", ExecutionState));
    5959      log = cloner.Clone(original.log);
     60      executionStack = new Stack<IOperation>();
    6061      IOperation[] contexts = original.executionStack.ToArray();
    6162      for (int i = contexts.Length - 1; i >= 0; i--)
     
    6364      pausePending = original.pausePending;
    6465      stopPending = original.stopPending;
     66      timer = new System.Timers.Timer(100);
     67      timer.AutoReset = true;
     68      timer.Elapsed += new System.Timers.ElapsedEventHandler(timer_Elapsed);
    6569    }
    6670    protected Engine()
  • branches/CloningRefactoring/HeuristicLab.Core/3.3/Scope.cs

    r4668 r4713  
    6464      : base(original, cloner) {
    6565      if (original.variables.Count > 0) variables = cloner.Clone(original.variables);
     66      else variables = new VariableCollection();
    6667      if (original.subScopes.Count > 0) {
    6768        subScopes = cloner.Clone(original.subScopes);
     
    6970          child.Parent = this;
    7071        RegisterSubScopesEvents();
    71       }
     72      } else subScopes = new ScopeList();
    7273    }
    7374    /// <summary>
Note: See TracChangeset for help on using the changeset viewer.