Sfoglia il codice sorgente

Fixed 0 size preview size calculation

flabbet 9 mesi fa
parent
commit
35b6f3a4af
1 ha cambiato i file con 3 aggiunte e 0 eliminazioni
  1. 3 0
      src/PixiEditor/Views/Dialogs/ExportFilePopup.axaml.cs

+ 3 - 0
src/PixiEditor/Views/Dialogs/ExportFilePopup.axaml.cs

@@ -385,6 +385,9 @@ internal partial class ExportFilePopup : PixiEditorPopup
 
             int newWidth = (int)(imageSize.X * scale);
             int newHeight = (int)(imageSize.Y * scale);
+            
+            newWidth = Math.Max(newWidth, 1);
+            newHeight = Math.Max(newHeight, 1);
 
             return new VecI(newWidth, newHeight);
         }