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