mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-08 07:21:34 +02:00
MenuDesigner: Rename a MenuItem when it is changed into a separator.
git-svn-id: trunk@58940 -
This commit is contained in:
parent
508a89d4af
commit
7183dd5d0b
@ -6,7 +6,7 @@ interface
|
||||
|
||||
uses
|
||||
// FCL
|
||||
Classes, SysUtils, Types, typinfo,
|
||||
Classes, SysUtils, Types, typinfo, strutils,
|
||||
// LazUtils
|
||||
LazLogger,
|
||||
// LCL
|
||||
@ -720,9 +720,11 @@ begin
|
||||
Assert(Assigned(FEditedMenuItem), 'TShadowMenu.StopEditingCaption: FEditedMenuItem = Nil');
|
||||
EditedShadow := TShadowItem(GetShadowForMenuItem(FEditedMenuItem));
|
||||
s := FInPlaceEditor.Text;
|
||||
if (s <> cLineCaption) and (s <> '') then
|
||||
if s <> '' then
|
||||
begin
|
||||
FEditedMenuItem.Caption:=s;
|
||||
if (s = cLineCaption) and AnsiStartsStr('MenuItem', FEditedMenuItem.Name) then
|
||||
FEditedMenuItem.Name:=FEditorDesigner.CreateUniqueComponentName('N');
|
||||
GlobalDesignHook.RefreshPropertyValues;
|
||||
GlobalDesignHook.Modified(FEditedMenuItem);
|
||||
EditedShadow.Invalidate;
|
||||
|
@ -120,7 +120,7 @@ type
|
||||
TMenuItem = class(TLCLComponent)
|
||||
private
|
||||
FActionLink: TMenuActionLink;
|
||||
FCaption: string;
|
||||
FCaption: TTranslateString;
|
||||
FBitmap: TBitmap;
|
||||
FGlyphShowMode: TGlyphShowMode;
|
||||
FHandle: HMenu;
|
||||
|
Loading…
Reference in New Issue
Block a user