|
@@ -273,6 +273,7 @@ namespace ComPDFKit.Tool
|
|
|
else
|
|
|
{
|
|
|
currentEditAreaObject = item.Value;
|
|
|
+ currentEditAreaObject.ControlType = PointControlType.Body;
|
|
|
}
|
|
|
|
|
|
CaretVisual caretVisual = CommonHelper.FindVisualChild<CaretVisual>(PDFViewer.GetViewForTag(textEditTag));
|
|
@@ -2728,18 +2729,34 @@ namespace ComPDFKit.Tool
|
|
|
CPDFPage cPDFPage = cPDFDocument.PageAtIndex(multiPage);
|
|
|
CPDFEditPage cPDFEditPage = cPDFPage.GetEditPage();
|
|
|
cPDFEditPage.BeginEdit(CPDFEditType.EditText | CPDFEditType.EditImage);
|
|
|
- foreach (SelectedRect item in MultiSelectEditList.Children)
|
|
|
+ foreach (SelectedRect item in MultiSelectEditList.GetMulitSelectList())
|
|
|
{
|
|
|
Rect rect = item.GetRect();
|
|
|
rects.Add(rect);
|
|
|
}
|
|
|
Dictionary<Rect, Point> rectandpoint = AlignmentsHelp.SetGapDistributeHorizontal(rects, drawRect);
|
|
|
- foreach (SelectedRect item in MultiSelectEditList.Children)
|
|
|
+ foreach (SelectedRect checkItem in MultiSelectEditList.GetMulitSelectList())
|
|
|
{
|
|
|
+ SelectedRect item = checkItem;
|
|
|
+ EditAreaObject editAreaObject = GetEditAreaObjectListForRect(item);
|
|
|
+ if (editAreaObject == null)
|
|
|
+ {
|
|
|
+ if (MultiSelectEditList.GetRelationKey(item, out int checkPage, out int checkEdit))
|
|
|
+ {
|
|
|
+ editAreaObject = GetEditAreaObjectListForIndex(checkPage, checkEdit);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (item == null)
|
|
|
+ {
|
|
|
+ continue;
|
|
|
+ }
|
|
|
PDFEditHistory pDFEditHistory = new PDFEditHistory();
|
|
|
pDFEditHistory.PageIndex = multiPage;
|
|
|
pDFEditHistory.EditPage = cPDFEditPage;
|
|
|
- EditAreaObject editAreaObject = GetEditAreaObjectListForRect(item);
|
|
|
+ if (editAreaObject == null)
|
|
|
+ {
|
|
|
+ continue;
|
|
|
+ }
|
|
|
EditAreaObject newEditAreaObject = GetSelectedForIndex(multiPage, editAreaObject.EditAreaIndex);
|
|
|
Rect rect = item.GetRect();
|
|
|
item.SetRect(GetDrawAlignRect(rectandpoint[rect], rect, drawRect), currentZoom);
|
|
@@ -2775,18 +2792,34 @@ namespace ComPDFKit.Tool
|
|
|
CPDFPage cPDFPage = cPDFDocument.PageAtIndex(multiPage);
|
|
|
CPDFEditPage cPDFEditPage = cPDFPage.GetEditPage();
|
|
|
cPDFEditPage.BeginEdit(CPDFEditType.EditText | CPDFEditType.EditImage);
|
|
|
- foreach (SelectedRect item in MultiSelectEditList.Children)
|
|
|
+ foreach (SelectedRect item in MultiSelectEditList.GetMulitSelectList())
|
|
|
{
|
|
|
Rect rect = item.GetRect();
|
|
|
rects.Add(rect);
|
|
|
}
|
|
|
Dictionary<Rect, Point> rectandpoint = AlignmentsHelp.SetGapDistributeVertical(rects, drawRect);
|
|
|
- foreach (SelectedRect item in MultiSelectEditList.Children)
|
|
|
+ foreach (SelectedRect checkItem in MultiSelectEditList.GetMulitSelectList())
|
|
|
{
|
|
|
+ SelectedRect item = checkItem;
|
|
|
+ EditAreaObject editAreaObject = GetEditAreaObjectListForRect(item);
|
|
|
+ if (editAreaObject == null)
|
|
|
+ {
|
|
|
+ if (MultiSelectEditList.GetRelationKey(item, out int checkPage, out int checkEdit))
|
|
|
+ {
|
|
|
+ editAreaObject = GetEditAreaObjectListForIndex(checkPage, checkEdit);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (item == null)
|
|
|
+ {
|
|
|
+ continue;
|
|
|
+ }
|
|
|
PDFEditHistory pDFEditHistory = new PDFEditHistory();
|
|
|
pDFEditHistory.PageIndex = multiPage;
|
|
|
pDFEditHistory.EditPage = cPDFEditPage;
|
|
|
- EditAreaObject editAreaObject = GetEditAreaObjectListForRect(item);
|
|
|
+ if (editAreaObject == null)
|
|
|
+ {
|
|
|
+ continue;
|
|
|
+ }
|
|
|
EditAreaObject newEditAreaObject = GetSelectedForIndex(multiPage, editAreaObject.EditAreaIndex);
|
|
|
Rect rect = item.GetRect();
|
|
|
item.SetRect(GetDrawAlignRect(rectandpoint[rect], rect, drawRect), currentZoom);
|