Free cookie consent management tool by TermsFeed Policy Generator

Changeset 17015


Ignore:
Timestamp:
06/18/19 16:02:52 (5 years ago)
Author:
abeham
Message:

#2520: fixed bug in the clipboard when it contains objects not of type IStorableContent

Location:
trunk/HeuristicLab.Core.Views/3.3
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/HeuristicLab.Core.Views/3.3/Clipboard.cs

    r16997 r17015  
    155155      foreach (string filename in items) {
    156156        try {
    157           T item = (T)ContentManager.Load(filename);
     157          T item = null;
     158          if (HeuristicLab.Persistence.Default.Xml.XmlParser.CanOpen(filename)) {
     159            item = HeuristicLab.Persistence.Default.Xml.XmlParser.Deserialize<T>(filename);
     160          } else {
     161            item = (T)new ProtoBufSerializer().Deserialize(filename);
     162          }
    158163          OnItemLoaded(item, progressBar.Maximum / items.Length);
    159         } catch(Exception) {
     164        } catch (Exception) {
    160165          // ignore if loading a clipboad item fails.
    161166        }
  • trunk/HeuristicLab.Core.Views/3.3/HeuristicLab.Core.Views-3.3.csproj

    r16997 r17015  
    375375      <Private>False</Private>
    376376    </ProjectReference>
     377    <ProjectReference Include="..\..\HeuristicLab.Persistence\3.3\HeuristicLab.Persistence-3.3.csproj">
     378      <Project>{102bc7d3-0ef9-439c-8f6d-96ff0fdb8e1b}</Project>
     379      <Name>HeuristicLab.Persistence-3.3</Name>
     380      <Private>False</Private>
     381    </ProjectReference>
    377382    <ProjectReference Include="..\..\HeuristicLab.PluginInfrastructure\3.3\HeuristicLab.PluginInfrastructure-3.3.csproj">
    378383      <Project>{94186A6A-5176-4402-AE83-886557B53CCA}</Project>
  • trunk/HeuristicLab.Core.Views/3.3/Plugin.cs.frame

    r16997 r17015  
    3535  [PluginDependency("HeuristicLab.MainForm", "3.3")]
    3636  [PluginDependency("HeuristicLab.MainForm.WindowsForms", "3.3")]
     37  [PluginDependency("HeuristicLab.Persistence", "3.3")]
    3738  public class HeuristicLabCoreViewsPlugin : PluginBase {
    3839  }
Note: See TracChangeset for help on using the changeset viewer.