mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-11 09:28:07 +02:00
Designer: Use PopupMenuComponentEditor property to prevent a memory leak. Issue #36872.
git-svn-id: trunk@62928 -
This commit is contained in:
parent
0a548cf17d
commit
0726d31a26
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user