瀏覽代碼

裁剪-BUG

liyijie 1 年之前
父節點
當前提交
ac6025d980
共有 2 個文件被更改,包括 2 次插入2 次删除
  1. 1 1
      PDF Office/Helper/CropPageUndoManager.cs
  2. 1 1
      PDF Office/ViewModels/Tools/ToolsBarContentViewModel.cs

+ 1 - 1
PDF Office/Helper/CropPageUndoManager.cs

@@ -58,7 +58,7 @@ namespace PDF_Office.Helper
             if (cropPageEnumIndex != cropPageEnumList.Count - 1)
             {
                 cropPageEnumList.RemoveRange(cropPageEnumIndex+1, cropPageEnumList.Count - cropPageEnumIndex-1);
-                cropPageList.RemoveRange(cropPageList.Count - cropPageListInterval-37, cropPageListInterval);
+                cropPageList.RemoveRange(cropPageList.Count - cropPageListInterval- pdfviewer.Document.PageCount, cropPageListInterval);
                 cropPageListInterval = 0;
             }
             

+ 1 - 1
PDF Office/ViewModels/Tools/ToolsBarContentViewModel.cs

@@ -297,7 +297,7 @@ namespace PDF_Office.ViewModels.Tools
             }
             await Task.Run(() =>
             {
-                if (PDFViewer.CurrentIndex > 0)
+                if (PDFViewer.CurrentIndex >= 0)
                 {
                     UndoManager.cropPageList.Add(PDFViewer.CurrentIndex);
                 }