소스 검색

Updated name

flabbet 4 년 전
부모
커밋
f38b54a910
2개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. 1 1
      PixiEditor/Models/Layers/LayerStructure.cs
  2. 1 1
      PixiEditor/ViewModels/SubViewModels/Main/LayersViewModel.cs

+ 1 - 1
PixiEditor/Models/Layers/LayerStructure.cs

@@ -146,7 +146,7 @@ namespace PixiEditor.Models.Layers
             {
                 throw new ArgumentException("Child group can't be null.");
             }
-            GuidStructureItem group = new($"{childGroup.Name} (1)", childGroup.StartLayerGuid, childGroup.EndLayerGuid, new[] { childGroup }, childGroup.Parent) { IsExpanded = true };
+            GuidStructureItem group = new(groupName, childGroup.StartLayerGuid, childGroup.EndLayerGuid, new[] { childGroup }, childGroup.Parent) { IsExpanded = true };
             if (childGroup.Parent == null)
             {
                 Groups.Add(group);

+ 1 - 1
PixiEditor/ViewModels/SubViewModels/Main/LayersViewModel.cs

@@ -134,7 +134,7 @@ namespace PixiEditor.ViewModels.SubViewModels.Main
                 }
                 else if(control != null)
                 {
-                    doc.LayerStructure.AddNewGroup($"{doc.ActiveLayer.Name} Group", control);
+                    doc.LayerStructure.AddNewGroup($"{control.Name} Group", control);
                 }
 
                 doc.AddLayerStructureToUndo(lastGroups);