mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-06-24 11:08: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);
|
||||
begin
|
||||
AMenuItem.ImageIndex := AIcon;
|
||||
if EnvironmentOptions.Desktop.IDENameForDesignedFormList and IsFormDesign(AForm) then
|
||||
AMenuItem.Caption := AForm.Name
|
||||
if not IsFormDesign(AForm) then
|
||||
AMenuItem.Caption := AForm.Caption
|
||||
else
|
||||
AMenuItem.Caption := AForm.Caption;
|
||||
case AForm.ClassName of
|
||||
'TFrameProxyDesignerForm', // frame
|
||||
'TNonControlProxyDesignerForm': // datamodule
|
||||
AMenuItem.Caption := AForm.Caption;
|
||||
else // form
|
||||
if EnvironmentOptions.Desktop.IDENameForDesignedFormList then
|
||||
AMenuItem.Caption := AForm.Name
|
||||
else
|
||||
AMenuItem.Caption := AForm.Caption;
|
||||
end;
|
||||
AMenuItem.UserTag := {%H-}PtrUInt(AForm);
|
||||
end;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user