Jelajahi Sumber

Fixed moving groups

flabbet 4 tahun lalu
induk
melakukan
e3f1891a14

+ 2 - 2
PixiEditor/Views/UserControls/Layers/LayerGroupControl.xaml.cs

@@ -22,8 +22,8 @@ namespace PixiEditor.Views.UserControls.Layers
             set { SetValue(GroupGuidProperty, value); }
         }
 
-        public const string LayerGroupControlDataName = "PixiEditor.Views.UserControls.LayerGroupControl";
-        public const string LayerContainerDataName = "PixiEditor.Views.UserControls.LayerStructureItemContainer";
+        public const string LayerGroupControlDataName = "PixiEditor.Views.UserControls.Layers.LayerGroupControl";
+        public const string LayerContainerDataName = "PixiEditor.Views.UserControls.Layers.LayerStructureItemContainer";
 
         public static readonly DependencyProperty GroupGuidProperty =
             DependencyProperty.Register("GroupGuid", typeof(Guid), typeof(LayerGroupControl), new PropertyMetadata(Guid.NewGuid()));

+ 4 - 4
PixiEditor/Views/UserControls/Layers/LayerItem.xaml.cs

@@ -156,9 +156,9 @@ namespace PixiEditor.Views.UserControls.Layers
             Grid item = sender as Grid;
             RemoveDragEffect(item);
 
-            if (e.Data.GetDataPresent("PixiEditor.Views.UserControls.LayerStructureItemContainer"))
+            if (e.Data.GetDataPresent(LayerGroupControl.LayerContainerDataName))
             {
-                var data = (LayerStructureItemContainer)e.Data.GetData("PixiEditor.Views.UserControls.LayerStructureItemContainer");
+                var data = (LayerStructureItemContainer)e.Data.GetData(LayerGroupControl.LayerContainerDataName);
                 Guid layer = data.Layer.LayerGuid;
                 var doc = data.LayerCommandsViewModel.Owner.BitmapManager.ActiveDocument;
 
@@ -170,9 +170,9 @@ namespace PixiEditor.Views.UserControls.Layers
                 }
             }
 
-            if (e.Data.GetDataPresent("PixiEditor.Views.UserControls.LayerGroupControl"))
+            if (e.Data.GetDataPresent(LayerGroupControl.LayerGroupControlDataName))
             {
-                var data = (LayerGroupControl)e.Data.GetData("PixiEditor.Views.UserControls.LayerGroupControl");
+                var data = (LayerGroupControl)e.Data.GetData(LayerGroupControl.LayerGroupControlDataName);
                 Guid folder = data.GroupGuid;
 
                 var document = data.LayersViewModel.Owner.BitmapManager.ActiveDocument;