Explorar o código

Merge pull request #592 from PixiEditor/debug_save_desktop_fix

Removed debug fella
Krzysztof Krysiński hai 1 ano
pai
achega
9ea875be4a

+ 4 - 1
src/ChunkyImageLib/Surface.cs

@@ -1,4 +1,5 @@
-using System.Runtime.CompilerServices;
+using System.Diagnostics;
+using System.Runtime.CompilerServices;
 using System.Runtime.InteropServices;
 using PixiEditor.DrawingApi.Core.ColorsImpl;
 using PixiEditor.DrawingApi.Core.Numerics;
@@ -131,6 +132,7 @@ public class Surface : IDisposable
         return true;
     }
 
+#if DEBUG
     public void SaveToDesktop(string filename = "savedSurface.png")
     {
         using var final = DrawingSurface.Create(new ImageInfo(Size.X, Size.Y, ColorType.Rgba8888, AlphaType.Premul, ColorSpace.CreateSrgb()));
@@ -142,6 +144,7 @@ public class Surface : IDisposable
             png.SaveTo(stream);
         }
     }
+#endif
 
     private DrawingSurface CreateDrawingSurface()
     {

+ 0 - 2
src/PixiEditor.ChangeableDocument/Changes/Drawing/SelectionToMask_Change.cs

@@ -48,8 +48,6 @@ internal class SelectionToMask_Change : Change
         image.SetBlendMode(blendMode);
 
         var selectionImage = FloodFillHelper.FillSelection(target, selection!);
-        
-        selectionImage.SaveToDesktop();
 
         image.EnqueueDrawImage(new VecI(0, 0), selectionImage);