Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
08/01/11 17:48:53 (13 years ago)
Author:
mkommend
Message:

#1479: Integrated trunk changes.

Location:
branches/GP.Grammar.Editor/HeuristicLab.Core.Views/3.3
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • branches/GP.Grammar.Editor/HeuristicLab.Core.Views/3.3/Clipboard.cs

    r5839 r6618  
    2727using System.Threading;
    2828using System.Windows.Forms;
     29using HeuristicLab.Common;
    2930using HeuristicLab.MainForm;
    3031using HeuristicLab.Persistence.Default.Xml;
     
    321322          } else if (e.Data.GetData(HeuristicLab.Common.Constants.DragDropDataFormat) is IEnumerable) {
    322323            IEnumerable<T> items = ((IEnumerable)e.Data.GetData(HeuristicLab.Common.Constants.DragDropDataFormat)).Cast<T>();
     324            if (e.Effect.HasFlag(DragDropEffects.Copy)) {
     325              Cloner cloner = new Cloner();
     326              items = items.Select(x => cloner.Clone(x));
     327            }
    323328            foreach (T item in items)
    324               AddItem(e.Effect.HasFlag(DragDropEffects.Copy) ? (T)item.Clone() : item);
     329              AddItem(item);
    325330          }
    326331        }
  • branches/GP.Grammar.Editor/HeuristicLab.Core.Views/3.3/HeuristicLabCoreViewsPlugin.cs.frame

    r6099 r6618  
    2626  /// Plugin class for HeuristicLab.Core.Views plugin.
    2727  /// </summary>
    28   [Plugin("HeuristicLab.Core.Views", "3.3.4.$WCREV$")]
     28  [Plugin("HeuristicLab.Core.Views", "3.3.5.$WCREV$")]
    2929  [PluginFile("HeuristicLab.Core.Views-3.3.dll", PluginFileType.Assembly)]
    3030  [PluginDependency("HeuristicLab.Collections", "3.3")]
  • branches/GP.Grammar.Editor/HeuristicLab.Core.Views/3.3/ItemCollectionView.cs

    r5839 r6618  
    2626using System.Windows.Forms;
    2727using HeuristicLab.Collections;
     28using HeuristicLab.Common;
    2829using HeuristicLab.MainForm;
    2930using HeuristicLab.MainForm.WindowsForms;
     
    294295        } else if (e.Data.GetData(HeuristicLab.Common.Constants.DragDropDataFormat) is IEnumerable) {
    295296          IEnumerable<T> items = ((IEnumerable)e.Data.GetData(HeuristicLab.Common.Constants.DragDropDataFormat)).Cast<T>();
     297          if (e.Effect.HasFlag(DragDropEffects.Copy)) {
     298            Cloner cloner = new Cloner();
     299            items = items.Select(x => cloner.Clone(x));
     300          }
    296301          foreach (T item in items)
    297             Content.Add(e.Effect.HasFlag(DragDropEffects.Copy) ? (T)item.Clone() : item);
     302            Content.Add(item);
    298303        }
    299304      }
  • branches/GP.Grammar.Editor/HeuristicLab.Core.Views/3.3/ItemListView.cs

    r5928 r6618  
    2727using System.Windows.Forms;
    2828using HeuristicLab.Collections;
     29using HeuristicLab.Common;
    2930using HeuristicLab.MainForm;
    3031using HeuristicLab.MainForm.WindowsForms;
     
    334335        } else if (e.Data.GetData(HeuristicLab.Common.Constants.DragDropDataFormat) is IEnumerable) {
    335336          IEnumerable<T> items = ((IEnumerable)e.Data.GetData(HeuristicLab.Common.Constants.DragDropDataFormat)).Cast<T>();
     337          if (e.Effect.HasFlag(DragDropEffects.Copy)) {
     338            Cloner cloner = new Cloner();
     339            items = items.Select(x => cloner.Clone(x));
     340          }
    336341          foreach (T item in items) {
    337             if (listViewItem != null) Content.Insert(listViewItem.Index, e.Effect.HasFlag(DragDropEffects.Copy) ? (T)item.Clone() : item);
    338             else Content.Add(e.Effect.HasFlag(DragDropEffects.Copy) ? (T)item.Clone() : item);
     342            if (listViewItem != null) Content.Insert(listViewItem.Index, item);
     343            else Content.Add(item);
    339344          }
    340345        }
  • branches/GP.Grammar.Editor/HeuristicLab.Core.Views/3.3/Properties/AssemblyInfo.frame

    r6099 r6618  
    5454// by using the '*' as shown below:
    5555[assembly: AssemblyVersion("3.3.0.0")]
    56 [assembly: AssemblyFileVersion("3.3.4.$WCREV$")]
     56[assembly: AssemblyFileVersion("3.3.5.$WCREV$")]
Note: See TracChangeset for help on using the changeset viewer.