Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
05/10/17 15:23:54 (7 years ago)
Author:
mkommend
Message:

#2764: Merged r14842 into stable.

Location:
stable
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • stable

  • stable/HeuristicLab.Clients.Hive.JobManager/3.3/MenuItems/CreateHiveJobMenuItem.cs

    r14186 r14954  
    5555
    5656    public override void Execute() {
    57       IContentView activeView = MainFormManager.MainForm.ActiveView as IContentView;
    58       var content = activeView.Content as IItem;
     57      IContentView activeView = (IContentView)MainFormManager.MainForm.ActiveView;
     58      var content = (IItem)activeView.Content;
     59      var clonedConent = (IItem)content.Clone();
    5960
    6061      //IOptimizer and IExecutables need some special care
    61       if (content is IOptimizer) {
    62         ((IOptimizer)content).Runs.Clear();
     62      if (clonedConent is IOptimizer) {
     63        ((IOptimizer)clonedConent).Runs.Clear();
    6364      }
    64       if (content is IExecutable) {
    65         IExecutable exec = content as IExecutable;
     65      if (clonedConent is IExecutable) {
     66        IExecutable exec = clonedConent as IExecutable;
    6667        if (exec.ExecutionState != ExecutionState.Prepared) {
    6768          exec.Prepare();
     
    7172      HiveClient.Instance.Refresh();
    7273
    73       ItemTask hiveTask = ItemTask.GetItemTaskForItem(content);
     74      ItemTask hiveTask = ItemTask.GetItemTaskForItem(clonedConent);
    7475      HiveTask task = hiveTask.CreateHiveTask();
    7576      RefreshableJob rJob = new RefreshableJob();
    76       rJob.Job.Name = content.ToString();
     77      rJob.Job.Name = clonedConent.ToString();
    7778      rJob.HiveTasks.Add(task);
    78       task.ItemTask.ComputeInParallel = content is Experiment || content is BatchRun;
     79      task.ItemTask.ComputeInParallel = clonedConent is Experiment || clonedConent is BatchRun;
    7980
    8081      MainFormManager.MainForm.ShowContent(rJob);
Note: See TracChangeset for help on using the changeset viewer.