mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-07 00:38:10 +02:00
IDE: source editor command: fixed check focus in sourcenotebook or mainidebar, issue #27165
git-svn-id: branches/fixes_1_4@48097 -
This commit is contained in:
parent
0cd40f99e8
commit
cf25add3fa
@ -12715,11 +12715,12 @@ begin
|
||||
begin
|
||||
CurFocusControl:=FindOwnerControl(GetFocus);
|
||||
while (CurFocusControl<>nil) and (CurFocusControl<>MainIDEBar)
|
||||
and not (CurFocusControl is TSourceNotebook) do
|
||||
and not (CurFocusControl is TCustomForm) do
|
||||
CurFocusControl:=CurFocusControl.Parent;
|
||||
end;
|
||||
if Assigned(CurFocusControl) then
|
||||
begin // MainIDEBar or SourceNotebook has focus -> find active source editor
|
||||
if (CurFocusControl is TSourceNotebook) or (CurFocusControl=MainIDEBar) then
|
||||
begin
|
||||
// MainIDEBar or SourceNotebook has focus -> find active source editor
|
||||
GetCurrentUnit(ActiveSourceEditor,ActiveUnitInfo);
|
||||
if Assigned(ActiveSourceEditor) then begin
|
||||
ActiveSourceEditor.DoEditorExecuteCommand(EditorCommand); // pass the command
|
||||
|
Loading…
Reference in New Issue
Block a user