mirror of
https://github.com/HeidiSQL/HeidiSQL.git
synced 2025-08-26 03:01:07 +08:00
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:
@ -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;
|
||||
|
Reference in New Issue
Block a user