2
0
Эх сурвалжийг харах

Fixed merge with below order

CPKreuz 4 жил өмнө
parent
commit
f3bf182246

+ 4 - 4
PixiEditor/Models/DataHolders/Document/Document.Layers.cs

@@ -138,8 +138,8 @@ namespace PixiEditor.Models.DataHolders
         /// <summary>
         /// Merges two layers.
         /// </summary>
-        /// <param name="firstLayer">The index of the first.</param>
-        /// <param name="secondLayer">The index of the second.</param>
+        /// <param name="firstLayer">The lower layer.</param>
+        /// <param name="secondLayer">The upper layer.</param>
         /// <returns>The merged layer.</returns>
         public Layer MergeLayers(Layer firstLayer, Layer secondLayer, bool nameOfSecond, int index)
         {
@@ -170,8 +170,8 @@ namespace PixiEditor.Models.DataHolders
         /// <summary>
         /// Merges two layers.
         /// </summary>
-        /// <param name="firstIndex">The index of the first.</param>
-        /// <param name="secondIndex">The index of the second.</param>
+        /// <param name="firstIndex">The index of the lower layer.</param>
+        /// <param name="secondIndex">The index of the upper leyer.</param>
         /// <returns>The merged layer.</returns>
         public Layer MergeLayers(int firstIndex, int secondIndex, bool nameOfSecond)
         {

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

@@ -106,7 +106,7 @@ namespace PixiEditor.ViewModels.SubViewModels.Main
         public void MergeWithBelow(object parameter)
         {
             int index = (int)parameter;
-            Owner.BitmapManager.ActiveDocument.MergeLayers(index, index - 1, true);
+            Owner.BitmapManager.ActiveDocument.MergeLayers(index - 1, index, true);
         }
 
         public bool CanMergeWithAbove(object propery)