From 5a351b66a95f712368a52414c246f9871dd61eb1 Mon Sep 17 00:00:00 2001 From: jesus Date: Fri, 15 Jul 2016 02:47:54 +0000 Subject: [PATCH] LazReport: When pasting copied objects using the keyboard shortcut paste them at mouse cursor location if possible. git-svn-id: trunk@52690 - --- components/lazreport/source/lr_desgn.pas | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/components/lazreport/source/lr_desgn.pas b/components/lazreport/source/lr_desgn.pas index 37f7de857d..acb2b92fc0 100644 --- a/components/lazreport/source/lr_desgn.pas +++ b/components/lazreport/source/lr_desgn.pas @@ -4022,6 +4022,15 @@ var pStep := aValue; end; + procedure CheckPastePoint; + var + P: TPoint; + begin + P := PageView.ScreenToClient(Mouse.CursorPos); + if PtInRect(PageView.ClientRect, p) then + FReportPopupPoint := p; + end; + begin {$IFNDEF EXTOI} if (ActiveControl<>nil) and (ActiveControl.Parent=ObjInsp.fPropertyGrid) then @@ -4069,6 +4078,9 @@ begin GridAlign := not GridAlign; Key := 0; end; + if (Chr(Key) = 'V') and (ssCtrl in Shift) and PasteEnabled then + CheckPastePoint; + if CutEnabled then if (Key = VK_DELETE) and (ssShift in Shift) then CutBClick(Self); if CopyEnabled then