mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-16 19:09:19 +02:00
* Explicitly release MiniMap
This commit is contained in:
parent
d7bacb390f
commit
ae17b60288
@ -49,6 +49,7 @@ type
|
||||
procedure SetViewWindowTextColor(AValue: TColor);
|
||||
protected
|
||||
procedure NewEditorCreated(Sender: TObject);
|
||||
procedure EditorDestroyed(Sender: TObject);
|
||||
procedure Notification(AComponent: TComponent; Operation: TOperation); override;
|
||||
procedure ConfigPanel(aPanel: TMiniMapControl; aFull: Boolean = False);
|
||||
Property MiniMaps[aIndex : Integer] : TMiniMapControl Read GetMiniMap;
|
||||
@ -91,6 +92,7 @@ begin
|
||||
SourceEditorManagerIntf.RegisterChangeEvent(semEditorMoved,@NewEditorCreated);
|
||||
SourceEditorManagerIntf.RegisterChangeEvent(semEditorCloned,@NewEditorCreated);
|
||||
SourceEditorManagerIntf.RegisterChangeEvent(semEditorReConfigured,@EditorReconfigured);
|
||||
SourceEditorManagerIntf.RegisterChangeEvent(semEditorDestroy,@EditorDestroyed);
|
||||
end
|
||||
else
|
||||
begin
|
||||
@ -98,6 +100,7 @@ begin
|
||||
SourceEditorManagerIntf.UnRegisterChangeEvent(semEditorMoved,@NewEditorCreated);
|
||||
SourceEditorManagerIntf.UnRegisterChangeEvent(semEditorCloned,@NewEditorCreated);
|
||||
SourceEditorManagerIntf.UnRegisterChangeEvent(semEditorReConfigured,@EditorReconfigured);
|
||||
SourceEditorManagerIntf.UnRegisterChangeEvent(semEditorDestroy,@EditorDestroyed);
|
||||
end;
|
||||
end;
|
||||
|
||||
@ -201,6 +204,16 @@ begin
|
||||
EditorWindow.AddControlToEditor(Editor,Panel,Aligns[AlignLeft]);
|
||||
end;
|
||||
|
||||
procedure TMinimapController.EditorDestroyed(Sender: TObject);
|
||||
var
|
||||
Editor : TSourceEditorInterface absolute Sender;
|
||||
Map : TMiniMapControl;
|
||||
begin
|
||||
Map:=FindMiniMapForEditor(Editor);
|
||||
if Assigned(Map) then
|
||||
Application.ReleaseComponent(Map);
|
||||
end;
|
||||
|
||||
procedure TMinimapController.Notification(AComponent: TComponent;
|
||||
Operation: TOperation);
|
||||
begin
|
||||
|
Loading…
Reference in New Issue
Block a user