mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-05 13:56:00 +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
|
var
|
||||||
SenderParentForm: TCustomForm;
|
SenderParentForm: TCustomForm;
|
||||||
SelectedPersistent: TSelectedControl;
|
SelectedPersistent: TSelectedControl;
|
||||||
CompEditor: TBaseComponentEditor;
|
|
||||||
DesignSender, MouseDownControl: TControl;
|
DesignSender, MouseDownControl: TControl;
|
||||||
RubberBandWasActive, Handled: Boolean;
|
RubberBandWasActive, Handled: Boolean;
|
||||||
p, PopupPos: TPoint;
|
p, PopupPos: TPoint;
|
||||||
@ -2530,11 +2529,11 @@ begin
|
|||||||
Selection.AssignPersistent(MouseDownComponent);
|
Selection.AssignPersistent(MouseDownComponent);
|
||||||
if (ssDouble in MouseDownShift) and (Selection.SelectionForm = Form) then
|
if (ssDouble in MouseDownShift) and (Selection.SelectionForm = Form) then
|
||||||
begin // Double Click -> invoke 'Edit' of the component editor
|
begin // Double Click -> invoke 'Edit' of the component editor
|
||||||
CompEditor:=TheFormEditor.GetComponentEditor(MouseDownComponent);
|
PopupMenuComponentEditor := GetComponentEditorForSelection;
|
||||||
Assert(Assigned(CompEditor),
|
Assert(Assigned(PopupMenuComponentEditor),
|
||||||
'TDesigner.MouseUpOnControl: no component editor found for '
|
'TDesigner.MouseUpOnControl: no component editor found for '
|
||||||
+MouseDownComponent.Name+':'+MouseDownComponent.ClassName);
|
+MouseDownComponent.Name+':'+MouseDownComponent.ClassName);
|
||||||
CompEditor.Edit;
|
PopupMenuComponentEditor.Edit;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user