mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-07 18:58:04 +02:00
MenuDesigner: Put BeginUpdate / EndUpdate into better places.
git-svn-id: trunk@52264 -
This commit is contained in:
parent
20bdf22ce4
commit
f155e60e36
@ -664,16 +664,13 @@ procedure TShadowMenu.AddOnClick(Sender: TObject);
|
||||
var
|
||||
compEditor: TDefaultComponentEditor;
|
||||
begin
|
||||
if (FSelectedMenuItem <> nil) then begin
|
||||
FDesigner.FGui.BeginUpdate;
|
||||
try
|
||||
compEditor:=TDefaultComponentEditor.Create(FSelectedMenuItem, FEditorDesigner);
|
||||
compEditor.Edit;
|
||||
UpdateSelectedItemInfo;
|
||||
finally
|
||||
compEditor.Free;
|
||||
FDesigner.FGui.EndUpdate;
|
||||
end;
|
||||
if FSelectedMenuItem = nil then Exit;
|
||||
compEditor:=TDefaultComponentEditor.Create(FSelectedMenuItem, FEditorDesigner);
|
||||
try
|
||||
compEditor.Edit;
|
||||
UpdateSelectedItemInfo;
|
||||
finally
|
||||
compEditor.Free;
|
||||
end;
|
||||
end;
|
||||
|
||||
|
@ -669,6 +669,7 @@ var
|
||||
s: string;
|
||||
method: TMethod;
|
||||
begin
|
||||
BeginUpdate;
|
||||
if aMenuItem = nil then
|
||||
begin
|
||||
Caption:=Format(lisMenuEditorEditingSSNoMenuitemSelected,
|
||||
@ -686,6 +687,7 @@ begin
|
||||
ButtonsGroupBox.Enabled:=True;
|
||||
UpdateSubmenuGroupBox(aMenuItem, aShadowBox, aShadowBox.Level=0);
|
||||
end;
|
||||
EndUpdate;
|
||||
end;
|
||||
|
||||
{ TRadioIcon }
|
||||
|
Loading…
Reference in New Issue
Block a user