mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-06 15:00:31 +02:00
IDE: shortcuts: execute source editor command, when focused control has parent MainIDEBar or a TSourceNotebook, bug #19149
git-svn-id: trunk@33857 -
This commit is contained in:
parent
ab766bdc87
commit
53ecbea0d9
12
ide/main.pp
12
ide/main.pp
@ -18423,16 +18423,16 @@ var
|
||||
begin
|
||||
// check that the currently focus is on the MainIDEBar or on the SourceEditor
|
||||
CurFocusControl:=FindOwnerControl(GetFocus);
|
||||
if (CurFocusControl<>nil) then begin
|
||||
CurFocusControl:=GetParentForm(CurFocusControl);
|
||||
if (CurFocusControl<>MainIDEBar) and not(CurFocusControl is TSourceNotebook) then
|
||||
while (CurFocusControl<>nil) do begin
|
||||
if (CurFocusControl=MainIDEBar) or (CurFocusControl is TSourceNotebook) then
|
||||
begin
|
||||
// continue processing shortcut, not handled yet
|
||||
MainIDEBar.mnuMainMenu.ShortcutHandled := false;
|
||||
DoCommand(EditorCommand);
|
||||
exit;
|
||||
end;
|
||||
CurFocusControl:=CurFocusControl.Parent;
|
||||
end;
|
||||
DoCommand(EditorCommand);
|
||||
// continue processing shortcut, not handled yet
|
||||
MainIDEBar.mnuMainMenu.ShortcutHandled := false;
|
||||
end;
|
||||
|
||||
procedure TMainIDE.DoInsertGUID;
|
||||
|
Loading…
Reference in New Issue
Block a user