Browse Source

注释-复制、粘贴注释后选中

OYXH\oyxh 1 year ago
parent
commit
29f7013ff1
1 changed files with 27 additions and 8 deletions
  1. 27 8
      PDF Office/ViewModels/Tools/AnnotToolContentViewModel.Command.cs

+ 27 - 8
PDF Office/ViewModels/Tools/AnnotToolContentViewModel.Command.cs

@@ -1061,20 +1061,39 @@ namespace PDF_Master.ViewModels.Tools
                             {
                                 //填写与签名在此区域不选中,不添加selectAnnotDicts词典当中
                             }
-                            else if (annot.EventType == AnnotArgsType.AnnotSquare || annot.EventType == AnnotArgsType.AnnotCircle ||
-                                annot.EventType == AnnotArgsType.AnnotLine || annot.EventType == AnnotArgsType.AnnotStamp /*||
-                                annot.EventType == AnnotArgsType.AnnotSticky ||annot.EventType == AnnotArgsType.AnnotFreeText || annot.EventType == AnnotArgsType.AnnotFreehand*/)
+                            else
                             {
-                                if (selectAnnotDicts.ContainsKey(editEvent.PageIndex) == false)
+                                if (PropertyPanel.IsMultiSelected)
                                 {
-                                    selectAnnotDicts.Add(editEvent.PageIndex, new List<int>());
-                                    selectAnnotDicts[editEvent.PageIndex].Add(editEvent.AnnotIndex);
+                                    if (selectAnnotDicts.ContainsKey(editEvent.PageIndex) == false)
+                                    {
+                                        selectAnnotDicts.Add(editEvent.PageIndex, new List<int>());
+                                        selectAnnotDicts[editEvent.PageIndex].Add(editEvent.AnnotIndex);
+                                    }
+                                    else
+                                    {
+                                        selectAnnotDicts[editEvent.PageIndex].Add(editEvent.AnnotIndex);
+                                    }
+                                    isMultiple = true;
                                 }
                                 else
                                 {
-                                    selectAnnotDicts[editEvent.PageIndex].Add(editEvent.AnnotIndex);
+                                    if (annot.EventType == AnnotArgsType.AnnotSquare || annot.EventType == AnnotArgsType.AnnotCircle ||
+                                annot.EventType == AnnotArgsType.AnnotLine || annot.EventType == AnnotArgsType.AnnotStamp /*||
+                                annot.EventType == AnnotArgsType.AnnotSticky ||annot.EventType == AnnotArgsType.AnnotFreeText || annot.EventType == AnnotArgsType.AnnotFreehand*/)
+                                    {
+                                        if (selectAnnotDicts.ContainsKey(editEvent.PageIndex) == false)
+                                        {
+                                            selectAnnotDicts.Add(editEvent.PageIndex, new List<int>());
+                                            selectAnnotDicts[editEvent.PageIndex].Add(editEvent.AnnotIndex);
+                                        }
+                                        else
+                                        {
+                                            selectAnnotDicts[editEvent.PageIndex].Add(editEvent.AnnotIndex);
+                                        }
+                                        isMultiple = true;
+                                    }
                                 }
-                                isMultiple = true;
                             }
 
                             if (viewModel != null)