|
@@ -302,6 +302,7 @@ namespace Compdfkit_Tools.PDFControl
|
|
if (PdfViewControl != null && PdfViewControl.PDFViewTool != null)
|
|
if (PdfViewControl != null && PdfViewControl.PDFViewTool != null)
|
|
{
|
|
{
|
|
PdfViewControl.PDFViewTool.GetCPDFViewer()?.UndoManager?.Undo();
|
|
PdfViewControl.PDFViewTool.GetCPDFViewer()?.UndoManager?.Undo();
|
|
|
|
+ //PdfViewControl.PDFToolManager.ClearSelect();
|
|
PdfViewControl.PDFViewTool.GetCPDFViewer().UpDateRenderFrame();
|
|
PdfViewControl.PDFViewTool.GetCPDFViewer().UpDateRenderFrame();
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -311,6 +312,7 @@ namespace Compdfkit_Tools.PDFControl
|
|
if (PdfViewControl != null && PdfViewControl.PDFViewTool != null)
|
|
if (PdfViewControl != null && PdfViewControl.PDFViewTool != null)
|
|
{
|
|
{
|
|
PdfViewControl.PDFViewTool.GetCPDFViewer()?.UndoManager?.Redo();
|
|
PdfViewControl.PDFViewTool.GetCPDFViewer()?.UndoManager?.Redo();
|
|
|
|
+ //PdfViewControl.PDFToolManager.ClearSelect();
|
|
PdfViewControl.PDFViewTool.GetCPDFViewer().UpDateRenderFrame();
|
|
PdfViewControl.PDFViewTool.GetCPDFViewer().UpDateRenderFrame();
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -375,17 +377,16 @@ namespace Compdfkit_Tools.PDFControl
|
|
switch (e.hitTestType)
|
|
switch (e.hitTestType)
|
|
{
|
|
{
|
|
case MouseHitTestType.kTextEdit:
|
|
case MouseHitTestType.kTextEdit:
|
|
- CreateEditTextMenu(sender, ref ContextMenu);
|
|
|
|
- break;
|
|
|
|
case MouseHitTestType.kImageEdit:
|
|
case MouseHitTestType.kImageEdit:
|
|
|
|
+ CreateEditMenu(sender, ref ContextMenu);
|
|
break;
|
|
break;
|
|
default:
|
|
default:
|
|
- ContextMenu = null;
|
|
|
|
|
|
+ ContextMenu.Items.Add(new MenuItem() { Header = "Paste", Command = ApplicationCommands.Paste, CommandTarget = (UIElement)sender });
|
|
break;
|
|
break;
|
|
}
|
|
}
|
|
PdfViewControl.SetRightMenu(ContextMenu);
|
|
PdfViewControl.SetRightMenu(ContextMenu);
|
|
}
|
|
}
|
|
- private void CreateEditTextMenu(object sender, ref ContextMenu menu)
|
|
|
|
|
|
+ private void CreateEditMenu(object sender, ref ContextMenu menu)
|
|
{
|
|
{
|
|
menu.Items.Add(new MenuItem() { Header = "Delete", Command = ApplicationCommands.Delete, CommandTarget = (UIElement)sender });
|
|
menu.Items.Add(new MenuItem() { Header = "Delete", Command = ApplicationCommands.Delete, CommandTarget = (UIElement)sender });
|
|
menu.Items.Add(new MenuItem() { Header = "Copy", Command = ApplicationCommands.Copy, CommandTarget = (UIElement)sender });
|
|
menu.Items.Add(new MenuItem() { Header = "Copy", Command = ApplicationCommands.Copy, CommandTarget = (UIElement)sender });
|