Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
05/29/19 11:20:22 (5 years ago)
Author:
gkronber
Message:

#2520: Use ContentManager in Clipboard and StartPage. Show info when objects cannot be restored.

File:
1 edited

Legend:

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

    r16565 r16992  
    157157      foreach (string filename in items) {
    158158        try {
    159           var ser = new ProtoBufSerializer();
    160           T item = (T)ser.Deserialize(filename);
     159          T item = (T)ContentManager.Load(filename);
    161160          OnItemLoaded(item, progressBar.Maximum / items.Length);
    162         } catch (Exception) {
    163           try {
    164             // try old format if protobuf deserialization fails
    165             T item = XmlParser.Deserialize<T>(filename);
    166             OnItemLoaded(item, progressBar.Maximum / items.Length);
    167           } catch (Exception) { }
     161        } catch(Exception) {
     162          // ignore if loading a clipboad item fails.
    168163        }
    169164      }
Note: See TracChangeset for help on using the changeset viewer.