- Timestamp:
- 11/24/11 15:48:23 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Clients.Hive.JobManager/3.3/Views/RefreshableHiveJobView.cs
r7032 r7067 436 436 var obj = e.Data.GetData(Constants.DragDropDataFormat); 437 437 if (obj is IOptimizer) { 438 if ((e.KeyState & 32) == 32) e.Effect = DragDropEffects.Link; // ALT key 438 if (Content.Id != Guid.Empty) e.Effect = DragDropEffects.None; 439 else if ((e.KeyState & 32) == 32) e.Effect = DragDropEffects.Link; // ALT key 439 440 else if (e.AllowedEffect.HasFlag(DragDropEffects.Copy)) e.Effect = DragDropEffects.Copy; 440 441 } … … 447 448 var optimizer = obj as IOptimizer; 448 449 if (optimizer != null) { 449 Content.HiveTasks.Add(new OptimizerHiveTask(e.Effect.HasFlag(DragDropEffects.Copy) ? (IOptimizer)optimizer.Clone() : optimizer)); 450 IOptimizer newOptimizer = null; 451 if (e.Effect.HasFlag(DragDropEffects.Copy)) { 452 newOptimizer = (IOptimizer)optimizer.Clone(); 453 } else { 454 newOptimizer = optimizer; 455 } 456 if (newOptimizer.ExecutionState != ExecutionState.Prepared) { 457 newOptimizer.Prepare(); 458 } 459 460 Content.HiveTasks.Add(new OptimizerHiveTask(newOptimizer)); 450 461 } 451 462 }
Note: See TracChangeset
for help on using the changeset viewer.