mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-07 08:58:23 +02:00
IDE/Menu: Add open LPI/LPK to only recent projects/packages (not files) if they were opened as a project/package. Issues #39554, #41297
This commit is contained in:
parent
bfd5b97aab
commit
5dea682202
@ -1284,10 +1284,6 @@ begin
|
||||
exit(mrCancel);
|
||||
end;
|
||||
|
||||
if ([ofAddToRecent,ofRevert,ofVirtualFile]*FFlags=[ofAddToRecent])
|
||||
and (FFilename<>'') and FilenameIsAbsolute(FFilename) then
|
||||
EnvironmentOptions.AddToRecentOpenFiles(FFilename);
|
||||
|
||||
// check if this is a hidden unit:
|
||||
// if this is the main unit, it is already
|
||||
// loaded and needs only to be shown in the sourceeditor/formeditor
|
||||
@ -1347,6 +1343,10 @@ begin
|
||||
if Result <> mrOK then exit;
|
||||
end;
|
||||
|
||||
if ([ofAddToRecent,ofRevert,ofVirtualFile]*FFlags=[ofAddToRecent])
|
||||
and (FFilename<>'') and FilenameIsAbsolute(FFilename) then
|
||||
EnvironmentOptions.AddToRecentOpenFiles(FFilename);
|
||||
|
||||
if (FNewEditorInfo <> nil) and (ofAddToProject in FFlags) and (not FNewUnitInfo.IsPartOfProject) then
|
||||
begin
|
||||
FNewUnitInfo.IsPartOfProject:=true;
|
||||
|
Loading…
Reference in New Issue
Block a user