mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-10 19:35:58 +02:00
MenuDesigner: Jump also to an existing OnClick handler. Fix crash when changing projects.
git-svn-id: trunk@52260 -
This commit is contained in:
parent
e49084d8b3
commit
a483fc5371
@ -2028,8 +2028,10 @@ begin
|
||||
existingSI.RealItem.Parent.Insert(idx, newMI);
|
||||
TShadowItem.CreateWithBoxAndItem(FShadowMenu, existingSI.ParentBox, newMI);
|
||||
FShadowMenu.UpdateBoxLocationsAndSizes;
|
||||
FShadowMenu.FDesigner.FGui.AddingItem := True;
|
||||
GlobalDesignHook.PersistentAdded(newMI, not isSeparator);
|
||||
GlobalDesignHook.Modified(newMI);
|
||||
//GlobalDesignHook.Modified(newMI);
|
||||
FShadowMenu.FDesigner.FGui.AddingItem := False;
|
||||
if not isSeparator then
|
||||
FShadowMenu.FDesigner.FGui.UpdateStatistics;
|
||||
FShadowMenu.UpdateActionsEnabledness;
|
||||
@ -2220,8 +2222,7 @@ end;
|
||||
procedure TShadowItem.DblClick;
|
||||
begin
|
||||
inherited DblClick;
|
||||
if not FShadowMenu.OnClickIsAssigned(FRealItem) then
|
||||
FShadowMenu.AddOnClick(nil);
|
||||
FShadowMenu.AddOnClick(nil);
|
||||
end;
|
||||
|
||||
function TShadowItem.GetHeight: integer;
|
||||
|
@ -69,6 +69,7 @@ type
|
||||
FAcceleratorMenuItemsCount: integer;
|
||||
FCaptionedItemsCount: integer;
|
||||
FDeepestNestingLevel: integer;
|
||||
FAddingItem: Boolean;
|
||||
FGUIEnabled: boolean;
|
||||
FIconsCount: integer;
|
||||
FUpdateCount: integer;
|
||||
@ -102,6 +103,7 @@ type
|
||||
aShadowBox: TShadowBoxBase; aPropEditHook: TPropertyEditorHook);
|
||||
//property EditedMenu: TMenu read FEditedMenu;
|
||||
//property AcceleratorMenuItemsCount: integer read FAcceleratorMenuItemsCount;
|
||||
property AddingItem: Boolean read FAddingItem write FAddingItem;
|
||||
end;
|
||||
|
||||
TRadioIconGroup = class;
|
||||
@ -289,8 +291,8 @@ begin
|
||||
SetMenu(mnu, mi);
|
||||
end;
|
||||
end
|
||||
else
|
||||
DebugLn('TMenuDesignerForm.OnDesignerSetSelection: Is SetMenu(nil, nil) ever needed here?');
|
||||
else if not AddingItem then
|
||||
SetMenu(nil, nil);
|
||||
end;
|
||||
|
||||
procedure TMenuDesignerForm.ShowPopupAssignmentsInfo;
|
||||
|
Loading…
Reference in New Issue
Block a user