Explorar o código

Merge branch 'dev' of http://git.kdan.cc:8865/Windows/PDFOffice_Windows_exe into dev

OYXH\oyxh hai 1 ano
pai
achega
35be91109f
Modificáronse 1 ficheiros con 17 adicións e 6 borrados
  1. 17 6
      PDF Office/ViewModels/Tools/AnnotToolContentViewModel.cs

+ 17 - 6
PDF Office/ViewModels/Tools/AnnotToolContentViewModel.cs

@@ -9,6 +9,7 @@ using PDF_Master.CustomControl;
 using PDF_Master.EventAggregators;
 using PDF_Master.Helper;
 using PDF_Master.Model;
+using PDF_Master.Model.AnnotPanel;
 using PDF_Master.Model.BOTA;
 using PDF_Master.Properties;
 using PDF_Master.ViewModels.BOTA;
@@ -227,13 +228,18 @@ namespace PDF_Master.ViewModels.Tools
                 MyToolCheckedDoing(dictVar, tag);
                 FindAnnotTypeKey(tag, ref annotArgs);
 
-                if (annotArgs != null)
+                if (annotArgs != null && tag != "Stamp")
                 {
                     //设置点击页面会创建对应选中注释工具的注释
                     annotArgs.Author = Settings.Default.AppProperties.Description.Author;
                     PDFViewer.SetMouseMode(MouseModes.AnnotCreate);
                     PDFViewer.SetToolParam(annotArgs);
                 }
+                else
+                {
+                    //2023/4/6 设置Stamp刚进入时点击view出现空的选中方框
+                    PDFViewer.SetMouseMode(MouseModes.None);
+                }
                 if (PropertyPanel.IsSelectedTextAddLink)
                 {
                     PropertyPanel.IsSelectedTextAddLink = false;
@@ -286,8 +292,8 @@ namespace PDF_Master.ViewModels.Tools
             if (BtnHandIsChecked)
                 BtnHandIsChecked = false;
             //选中取消问题待优化 2023/4/4
-            if(BtnSelecttoolIsChecked&& tag!= "SnapshotEdit")
-                BtnSelecttoolIsChecked=false;
+            if (BtnSelecttoolIsChecked && tag != "SnapshotEdit")
+                BtnSelecttoolIsChecked = false;
             PDFViewer.ClearSelectAnnots();
 
             //选中内容选择工具按钮
@@ -1773,14 +1779,19 @@ namespace PDF_Master.ViewModels.Tools
                 AnnotHandlerEventArgs annotArgs = null;
                 StrAnnotToolChecked = tuple.Item2;
                 FindAnnotTypeKey(tuple.Item2, ref annotArgs);
-                if (annotArgs != null)
+                if (annotArgs != null && tuple.Item2 != "Stamp")
                 {
                     annotArgs.Author = Settings.Default.AppProperties.Description.Author;
                     PDFViewer.SetMouseMode(MouseModes.AnnotCreate);
                     PDFViewer.SetToolParam(annotArgs);
                     PDFViewer.ToolManager.EnableClickCreate = false;
-                }
-            }
+                }
+                else
+                {
+                    //2023/4/6 设置Stamp刚进入时点击view出现空的选中方框
+                    PDFViewer.SetMouseMode(MouseModes.None);
+                }
+            }
         }
 
         private Tuple<Key, string> GetCtrlAltKey()