Designer: Use PopupMenuComponentEditor property to prevent a memory leak. Issue #36872.

git-svn-id: trunk@62928 -
This commit is contained in:
juha 2020-04-10 21:31:09 +00:00
parent 0a548cf17d
commit 0726d31a26

View File

@ -2413,7 +2413,6 @@ var
var
SenderParentForm: TCustomForm;
SelectedPersistent: TSelectedControl;
CompEditor: TBaseComponentEditor;
DesignSender, MouseDownControl: TControl;
RubberBandWasActive, Handled: Boolean;
p, PopupPos: TPoint;
@ -2530,11 +2529,11 @@ begin
Selection.AssignPersistent(MouseDownComponent);
if (ssDouble in MouseDownShift) and (Selection.SelectionForm = Form) then
begin // Double Click -> invoke 'Edit' of the component editor
CompEditor:=TheFormEditor.GetComponentEditor(MouseDownComponent);
Assert(Assigned(CompEditor),
PopupMenuComponentEditor := GetComponentEditorForSelection;
Assert(Assigned(PopupMenuComponentEditor),
'TDesigner.MouseUpOnControl: no component editor found for '
+MouseDownComponent.Name+':'+MouseDownComponent.ClassName);
CompEditor.Edit;
PopupMenuComponentEditor.Edit;
end;
end;
end