mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-19 23:49:36 +02:00
IDE: auto open designer form: open only the active unit form, not all, bug #16825
git-svn-id: trunk@26432 -
This commit is contained in:
parent
358af10c61
commit
6b289c7897
14
ide/main.pp
14
ide/main.pp
@ -8383,7 +8383,7 @@ var
|
||||
if FilenameIsPascalUnit(AFilename) then begin
|
||||
// this could be a unit with a form
|
||||
//debugln('TMainIDE.DoOpenEditorFile ',AFilename,' ',OpenFlagsToString(Flags));
|
||||
if (not (ofDoNotLoadResource in Flags))
|
||||
if ([ofDoNotLoadResource,ofProjectLoading]*Flags=[])
|
||||
and ( (ofDoLoadResource in Flags)
|
||||
or ((not Project1.AutoOpenDesignerFormsDisabled)
|
||||
and (EnvironmentOptions.AutoCreateFormsOnOpen
|
||||
@ -9986,6 +9986,18 @@ begin
|
||||
SourceEditorManager.ShowActiveWindowOnTop(True);
|
||||
end;
|
||||
|
||||
if ([ofDoNotLoadResource]*Flags=[])
|
||||
and ( (not Project1.AutoOpenDesignerFormsDisabled)
|
||||
and EnvironmentOptions.AutoCreateFormsOnOpen
|
||||
and (SourceEditorManager.ActiveEditor<>nil) )
|
||||
then begin
|
||||
// auto open form of active unit
|
||||
AnUnitInfo:=Project1.UnitWithEditorComponent(SourceEditorManager.ActiveEditor);
|
||||
if AnUnitInfo<>nil then
|
||||
Result:=DoLoadLFM(AnUnitInfo,[ofProjectLoading,ofMultiOpen,ofOnlyIfExists],
|
||||
[cfSaveDependencies]);
|
||||
end;
|
||||
|
||||
// select a form (object inspector, formeditor, control selection)
|
||||
if FLastFormActivated<>nil then begin
|
||||
LastDesigner:=TDesigner(FLastFormActivated.Designer);
|
||||
|
Loading…
Reference in New Issue
Block a user