Storage - Fix new profile creation

UI - Fix a crash when dragging and dropping in the sidebar
This commit is contained in:
Robert committed 2024-03-15 17:13:21 +01:00
1 parent 18d75318d9
commit 7e981a61d3
9 files changed
+27 -34

No files matched your search

+1 -3
View File
@@ -363,9 +363,7 @@ public sealed class Folder : RenderProfileElement
FolderEntity.Name = Name;
FolderEntity.IsExpanded = IsExpanded;
FolderEntity.Suspended = Suspended;
FolderEntity.ProfileId = Profile.EntityId;
SaveRenderElement();
}
-1
View File
@@ -321,7 +321,6 @@ public sealed class Layer : RenderProfileElement
LayerEntity.Order = Order;
LayerEntity.Suspended = Suspended;
LayerEntity.Name = Name;
LayerEntity.ProfileId = Profile.EntityId;
General.ApplyToEntity();
Transform.ApplyToEntity();
@@ -41,6 +41,9 @@ public class ProfileConfiguration : BreakableModel, IStorageModel, IDisposable,
Icon = new ProfileConfigurationIcon(Entity);
Icon.SetIconByName(icon);
ActivationCondition = new NodeScript<bool>("Activate profile", "Whether or not the profile should be active", this);
Entity.Profile.Id = Guid.NewGuid();
Entity.ProfileConfiguration.ProfileId = Entity.Profile.Id;
}
internal ProfileConfiguration(ProfileCategory category, ProfileContainerEntity entity)
@@ -188,7 +191,7 @@ public class ProfileConfiguration : BreakableModel, IStorageModel, IDisposable,
/// alongside any activation requirements of the <see cref="Module" />, if set
/// </summary>
public NodeScript<bool> ActivationCondition { get; }
/// <summary>
/// Gets the entity used by this profile config
/// </summary>