mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-07 13:17:01 +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
|
uses
|
||||||
// FCL
|
// FCL
|
||||||
Classes, SysUtils, Types, typinfo,
|
Classes, SysUtils, Types, typinfo, strutils,
|
||||||
// LazUtils
|
// LazUtils
|
||||||
LazLogger,
|
LazLogger,
|
||||||
// LCL
|
// LCL
|
||||||
@ -720,9 +720,11 @@ begin
|
|||||||
Assert(Assigned(FEditedMenuItem), 'TShadowMenu.StopEditingCaption: FEditedMenuItem = Nil');
|
Assert(Assigned(FEditedMenuItem), 'TShadowMenu.StopEditingCaption: FEditedMenuItem = Nil');
|
||||||
EditedShadow := TShadowItem(GetShadowForMenuItem(FEditedMenuItem));
|
EditedShadow := TShadowItem(GetShadowForMenuItem(FEditedMenuItem));
|
||||||
s := FInPlaceEditor.Text;
|
s := FInPlaceEditor.Text;
|
||||||
if (s <> cLineCaption) and (s <> '') then
|
if s <> '' then
|
||||||
begin
|
begin
|
||||||
FEditedMenuItem.Caption:=s;
|
FEditedMenuItem.Caption:=s;
|
||||||
|
if (s = cLineCaption) and AnsiStartsStr('MenuItem', FEditedMenuItem.Name) then
|
||||||
|
FEditedMenuItem.Name:=FEditorDesigner.CreateUniqueComponentName('N');
|
||||||
GlobalDesignHook.RefreshPropertyValues;
|
GlobalDesignHook.RefreshPropertyValues;
|
||||||
GlobalDesignHook.Modified(FEditedMenuItem);
|
GlobalDesignHook.Modified(FEditedMenuItem);
|
||||||
EditedShadow.Invalidate;
|
EditedShadow.Invalidate;
|
||||||
|
@ -120,7 +120,7 @@ type
|
|||||||
TMenuItem = class(TLCLComponent)
|
TMenuItem = class(TLCLComponent)
|
||||||
private
|
private
|
||||||
FActionLink: TMenuActionLink;
|
FActionLink: TMenuActionLink;
|
||||||
FCaption: string;
|
FCaption: TTranslateString;
|
||||||
FBitmap: TBitmap;
|
FBitmap: TBitmap;
|
||||||
FGlyphShowMode: TGlyphShowMode;
|
FGlyphShowMode: TGlyphShowMode;
|
||||||
FHandle: HMenu;
|
FHandle: HMenu;
|
||||||
|
Loading…
Reference in New Issue
Block a user