mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-22 07:19:31 +02:00
LCL: Check modifier keys (Shift, Ctrl, Alt) when editing the name of a TreeView. From n7800.
This commit is contained in:
parent
fd01caa9a2
commit
7716068e1a
@ -6498,7 +6498,7 @@ procedure TCustomTreeView.EditorEditingDone(Sender: TObject);
|
|||||||
var
|
var
|
||||||
WasFocused: Boolean;
|
WasFocused: Boolean;
|
||||||
begin
|
begin
|
||||||
WasFocused := (FEditor<>nil) and FEditor.Focused;
|
WasFocused := Assigned(FEditor) and FEditor.Focused;
|
||||||
EndEditing;
|
EndEditing;
|
||||||
if WasFocused then
|
if WasFocused then
|
||||||
SetFocus;
|
SetFocus;
|
||||||
@ -6509,7 +6509,7 @@ procedure TCustomTreeView.EditorKeyDown(Sender: TObject; var Key: Word;
|
|||||||
var
|
var
|
||||||
WasFocused: Boolean;
|
WasFocused: Boolean;
|
||||||
begin
|
begin
|
||||||
if (Key = VK_ESCAPE) or (Key = VK_RETURN) then
|
if (Key in [VK_RETURN, VK_ESCAPE]) and (Shift = []) then
|
||||||
begin
|
begin
|
||||||
WasFocused := Assigned(FEditor) and FEditor.Focused;
|
WasFocused := Assigned(FEditor) and FEditor.Focused;
|
||||||
EndEditing(Key = VK_ESCAPE);
|
EndEditing(Key = VK_ESCAPE);
|
||||||
|
Loading…
Reference in New Issue
Block a user