Revert r52264 #f155e60e36. It caused a crash in menu designer.

git-svn-id: trunk@52271 -
This commit is contained in:
juha 2016-05-03 10:58:10 +00:00
parent b23cb808f8
commit fd5482a304
2 changed files with 10 additions and 9 deletions

View File

@ -664,13 +664,16 @@ procedure TShadowMenu.AddOnClick(Sender: TObject);
var
compEditor: TDefaultComponentEditor;
begin
if FSelectedMenuItem = nil then Exit;
compEditor:=TDefaultComponentEditor.Create(FSelectedMenuItem, FEditorDesigner);
try
compEditor.Edit;
UpdateSelectedItemInfo;
finally
compEditor.Free;
if (FSelectedMenuItem <> nil) then begin
FDesigner.FGui.BeginUpdate;
try
compEditor:=TDefaultComponentEditor.Create(FSelectedMenuItem, FEditorDesigner);
compEditor.Edit;
UpdateSelectedItemInfo;
finally
compEditor.Free;
FDesigner.FGui.EndUpdate;
end;
end;
end;

View File

@ -669,7 +669,6 @@ var
s: string;
method: TMethod;
begin
BeginUpdate;
if aMenuItem = nil then
begin
Caption:=Format(lisMenuEditorEditingSSNoMenuitemSelected,
@ -687,7 +686,6 @@ begin
ButtonsGroupBox.Enabled:=True;
UpdateSubmenuGroupBox(aMenuItem, aShadowBox, aShadowBox.Level=0);
end;
EndUpdate;
end;
{ TRadioIcon }