Browse Source

保存- 修复:保存不提示的情况下,新建文件不选择保存路径无法关闭页签的问题

ZhouJieSheng 1 year ago
parent
commit
d333a00cf7
1 changed files with 3 additions and 1 deletions
  1. 3 1
      PDF Office/ViewModels/MainWindowViewModel.cs

+ 3 - 1
PDF Office/ViewModels/MainWindowViewModel.cs

@@ -476,8 +476,10 @@ namespace PDF_Master.ViewModels
             if (maincontentViewModel.PDFViewer != null && maincontentViewModel.PDFViewer.UndoManager.CanSave)
             {
                 ContentResult result = ShowSaveDialog(maincontentViewModel.viewContentViewModel);
-                if (result == ContentResult.Cancel)
+                //此处要加上第二个判断,如果去除第二个判断,则新建文件后,点击关闭按钮,不选择保存路径时,无法关闭页签
+                if (result == ContentResult.Cancel&& !Settings.Default.AppProperties.Description.NotShowSaveWhenClose)
                 {
+                    //非自动保存且取消了另存为时
                     return;
                 }
             }