mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-22 15:19:29 +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
|
var
|
||||||
compEditor: TDefaultComponentEditor;
|
compEditor: TDefaultComponentEditor;
|
||||||
begin
|
begin
|
||||||
if (FSelectedMenuItem <> nil) then begin
|
if FSelectedMenuItem = nil then Exit;
|
||||||
FDesigner.FGui.BeginUpdate;
|
compEditor:=TDefaultComponentEditor.Create(FSelectedMenuItem, FEditorDesigner);
|
||||||
try
|
try
|
||||||
compEditor:=TDefaultComponentEditor.Create(FSelectedMenuItem, FEditorDesigner);
|
compEditor.Edit;
|
||||||
compEditor.Edit;
|
UpdateSelectedItemInfo;
|
||||||
UpdateSelectedItemInfo;
|
finally
|
||||||
finally
|
compEditor.Free;
|
||||||
compEditor.Free;
|
|
||||||
FDesigner.FGui.EndUpdate;
|
|
||||||
end;
|
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
@ -669,6 +669,7 @@ var
|
|||||||
s: string;
|
s: string;
|
||||||
method: TMethod;
|
method: TMethod;
|
||||||
begin
|
begin
|
||||||
|
BeginUpdate;
|
||||||
if aMenuItem = nil then
|
if aMenuItem = nil then
|
||||||
begin
|
begin
|
||||||
Caption:=Format(lisMenuEditorEditingSSNoMenuitemSelected,
|
Caption:=Format(lisMenuEditorEditingSSNoMenuitemSelected,
|
||||||
@ -686,6 +687,7 @@ begin
|
|||||||
ButtonsGroupBox.Enabled:=True;
|
ButtonsGroupBox.Enabled:=True;
|
||||||
UpdateSubmenuGroupBox(aMenuItem, aShadowBox, aShadowBox.Level=0);
|
UpdateSubmenuGroupBox(aMenuItem, aShadowBox, aShadowBox.Level=0);
|
||||||
end;
|
end;
|
||||||
|
EndUpdate;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{ TRadioIcon }
|
{ TRadioIcon }
|
||||||
|
Loading…
Reference in New Issue
Block a user