IDE: ofDoNotActiveSourceEditor of TOpenFlag added

This commit is contained in:
rich2014 2023-12-02 00:37:04 +08:00
parent ad71b6b4b4
commit c000fed74d
2 changed files with 4 additions and 2 deletions

View File

@ -96,7 +96,8 @@ type
ofDoLoadResource,// do open form, datamodule, ... (overriding default)
ofLoadHiddenResource,// load component hidden
ofAddToProject, // add file to project (if exists)
ofInternalFile // opening data from an internal source (e.g. an editor macro (pascal script) from memory)
ofInternalFile, // opening data from an internal source (e.g. an editor macro (pascal script) from memory)
ofDoNotActiveSourceEditor // do not active the source editor window
);
TOpenFlags = set of TOpenFlag;

View File

@ -1319,7 +1319,8 @@ begin
if (FNewEditorInfo <> nil) and (FFlags * [ofProjectLoading, ofRevert] = [])
and (FNewEditorInfo.EditorComponent <> nil) then begin
SourceEditorManager.ShowActiveWindowOnTop(True);
if not (ofDoNotActiveSourceEditor in FFLags) then
SourceEditorManager.ShowActiveWindowOnTop(True);
exit(ChangeEditorPage);
end;