Profile import - Fixed and streamlined functionality

This commit is contained in:
SpoinkyNL committed 2020-09-25 21:32:53 +02:00
1 parent a5455c26d6
commit 8294cc306a
4 files changed
+24 -5

No files matched your search

@@ -1,5 +1,6 @@
using System;
using System.Collections.Generic;
using System.Linq;
namespace Artemis.Storage.Entities.Profile
{
@@ -19,5 +20,15 @@ namespace Artemis.Storage.Entities.Profile
public List<FolderEntity> Folders { get; set; }
public List<LayerEntity> Layers { get; set; }
public void UpdateGuid(Guid guid)
{
var oldGuid = Id;
Id = guid;
var rootFolder = Folders.FirstOrDefault(f => f.ParentId == oldGuid);
if (rootFolder != null)
rootFolder.ParentId = Id;
}
}
}