浏览代码

Fixed 0 size preview size calculation

flabbet 9 月之前
父节点
当前提交
35b6f3a4af
共有 1 个文件被更改,包括 3 次插入0 次删除
  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);
         }