Work around bug #965: paste text in find or search dialog. Ctrl+C/V/X does just nothing now if a search/replace dialog is open. Looks like the dialogs don't show up as Mainform.ActiveControl so it's impossible to handle it. Even a Windows message WM_CUT onto the dialogs handle has no effect here.

This commit is contained in:
Ansgar Becker
2009-01-30 20:00:31 +00:00
parent c824c4033c
commit 9e62d5ca02

View File

@ -8787,6 +8787,8 @@ begin
// Copy text from a focused control to clipboard
Success := False;
Control := ActiveControl;
// Do not handle Search/replace dialog
if not Control.Focused then Exit;
DoCut := Sender = actCut;
if Control is TCustomEdit then begin
Edit := TCustomEdit(Control);
@ -8830,6 +8832,8 @@ begin
// Paste text into the focused control
Success := False;
Control := ActiveControl;
// Do not handle Search/replace dialog
if not Control.Focused then Exit;
if not Clipboard.HasFormat(CF_TEXT) then begin
// Do nothing, we cannot paste a picture or so
end else if Control is TCustomEdit then begin
@ -8867,6 +8871,8 @@ begin
// Select all items, text or whatever
Success := False;
Control := ActiveControl;
// Do not handle Search/replace dialog
if not Control.Focused then Exit;
if Control is TCustomEdit then begin
TCustomEdit(Control).SelectAll;
Success := True;