mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-06-28 12:48:30 +02:00
IDE: Show frames and datamodules correctly in menu with option "Window menu shows designed form's name instead of caption". Issue #37138, patch from FTurtle.
git-svn-id: trunk@63226 -
This commit is contained in:
parent
1c63f54328
commit
c516e2543c
@ -1584,10 +1584,19 @@ end;
|
|||||||
procedure InitMenuItem(AMenuItem: TIDEMenuItem; AForm: TCustomForm; AIcon: Integer);
|
procedure InitMenuItem(AMenuItem: TIDEMenuItem; AForm: TCustomForm; AIcon: Integer);
|
||||||
begin
|
begin
|
||||||
AMenuItem.ImageIndex := AIcon;
|
AMenuItem.ImageIndex := AIcon;
|
||||||
if EnvironmentOptions.Desktop.IDENameForDesignedFormList and IsFormDesign(AForm) then
|
if not IsFormDesign(AForm) then
|
||||||
|
AMenuItem.Caption := AForm.Caption
|
||||||
|
else
|
||||||
|
case AForm.ClassName of
|
||||||
|
'TFrameProxyDesignerForm', // frame
|
||||||
|
'TNonControlProxyDesignerForm': // datamodule
|
||||||
|
AMenuItem.Caption := AForm.Caption;
|
||||||
|
else // form
|
||||||
|
if EnvironmentOptions.Desktop.IDENameForDesignedFormList then
|
||||||
AMenuItem.Caption := AForm.Name
|
AMenuItem.Caption := AForm.Name
|
||||||
else
|
else
|
||||||
AMenuItem.Caption := AForm.Caption;
|
AMenuItem.Caption := AForm.Caption;
|
||||||
|
end;
|
||||||
AMenuItem.UserTag := {%H-}PtrUInt(AForm);
|
AMenuItem.UserTag := {%H-}PtrUInt(AForm);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user