mirror of
https://github.com/Artemis-RGB/Artemis
synced 2026-11-11 19:36:28 +00:00
Profile import - Fixed and streamlined functionality
This commit is contained in:
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user