Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
07/07/11 09:00:45 (13 years ago)
Author:
swagner
Message:

Corrected cloning of multiple dropped items (#1564)

Location:
trunk/sources
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources

    • Property svn:ignore
      •  

        old new  
        1212*.psess
        1313*.vsp
         14*.docstates
  • trunk/sources/HeuristicLab.Optimization.Views/3.3/RunCollectionView.cs

    r5839 r6527  
    2727using System.Windows.Forms;
    2828using HeuristicLab.Collections;
     29using HeuristicLab.Common;
    2930using HeuristicLab.Core;
    3031using HeuristicLab.Core.Views;
     
    314315        } else if (e.Data.GetData(HeuristicLab.Common.Constants.DragDropDataFormat) is IEnumerable) {
    315316          IEnumerable<IRun> items = ((IEnumerable)e.Data.GetData(HeuristicLab.Common.Constants.DragDropDataFormat)).Cast<IRun>();
     317          if (e.Effect.HasFlag(DragDropEffects.Copy)) {
     318            Cloner cloner = new Cloner();
     319            items = items.Select(x => cloner.Clone(x));
     320          }
    316321          foreach (IRun item in items)
    317             Content.Add(e.Effect.HasFlag(DragDropEffects.Copy) ? (IRun)item.Clone() : item);
     322            Content.Add(item);
    318323        }
    319324      }
Note: See TracChangeset for help on using the changeset viewer.