Ver Fonte

裁剪-BUG

liyijie há 1 ano atrás
pai
commit
ac6025d980

+ 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);
                 }