|
@@ -784,35 +784,41 @@ namespace PDF_Office.ViewModels.Tools
|
|
|
foreach (var item in e)
|
|
|
{
|
|
|
if(item.EditAction == ActionType.Add)
|
|
|
- selectAnnotDicts.Add(count, new List<int>() { item.PageIndex, item.AnnotIndex });
|
|
|
- count++;
|
|
|
- }
|
|
|
- if(selectAnnotDicts.Count > 0)
|
|
|
- {
|
|
|
- var annot = e[0].EditAnnotArgs;
|
|
|
- if (
|
|
|
- annot.EventType == AnnotArgsType.AnnotSquare ||
|
|
|
- annot.EventType == AnnotArgsType.AnnotCircle ||
|
|
|
- annot.EventType == AnnotArgsType.AnnotLine ||
|
|
|
- annot.EventType == AnnotArgsType.AnnotStamp ||
|
|
|
- annot.EventType == AnnotArgsType.AnnotFreeText
|
|
|
- )
|
|
|
{
|
|
|
- PDFViewer.ClearSelectAnnots();
|
|
|
- if (StrAnnotToolChecked != "Signature")
|
|
|
+ var annot = item.EditAnnotArgs;
|
|
|
+ if (
|
|
|
+ annot.EventType == AnnotArgsType.AnnotSquare ||
|
|
|
+ annot.EventType == AnnotArgsType.AnnotCircle ||
|
|
|
+ annot.EventType == AnnotArgsType.AnnotLine ||
|
|
|
+ annot.EventType == AnnotArgsType.AnnotStamp ||
|
|
|
+ annot.EventType == AnnotArgsType.AnnotFreeText
|
|
|
+ )
|
|
|
{
|
|
|
- PDFViewer.SelectAnnotation(selectAnnotDicts);
|
|
|
- }
|
|
|
- else
|
|
|
- {
|
|
|
- AddAnnotSignature(annot);
|
|
|
- PDFViewer.SelectAnnotation(selectAnnotDicts);
|
|
|
+ if (selectAnnotDicts.ContainsKey(item.PageIndex) == false)
|
|
|
+ {
|
|
|
+ selectAnnotDicts.Add(item.PageIndex, new List<int>());
|
|
|
+ selectAnnotDicts[item.PageIndex].Add(item.AnnotIndex);
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ selectAnnotDicts[item.PageIndex].Add(item.AnnotIndex);
|
|
|
+ }
|
|
|
+
|
|
|
+ count++;
|
|
|
}
|
|
|
+
|
|
|
}
|
|
|
+
|
|
|
}
|
|
|
-
|
|
|
|
|
|
+
|
|
|
+ if (StrAnnotToolChecked == "Signature")
|
|
|
+ {
|
|
|
+ //AddAnnotSignature(annot);
|
|
|
+ }
|
|
|
|
|
|
+ PDFViewer.ClearSelectAnnots();
|
|
|
+ PDFViewer.SelectAnnotation(selectAnnotDicts);
|
|
|
|
|
|
|
|
|
|