mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-05-31 21:12:31 +02:00
EditorMacros List: fixed mem leak / update display
git-svn-id: trunk@37915 -
This commit is contained in:
parent
e7562d5987
commit
729e3aff3d
@ -609,6 +609,8 @@ begin
|
||||
end;
|
||||
|
||||
procedure TMacroListView.btnDeleteClick(Sender: TObject);
|
||||
var
|
||||
m: TEditorMacro;
|
||||
begin
|
||||
if lbRecordedView.ItemIndex < 0 then exit;
|
||||
if MessageDlg(lisDeleteSelectedMacro, mtConfirmation, [mbYes, mbNo], 0) = mrYes
|
||||
@ -617,7 +619,9 @@ begin
|
||||
CurrentActiveMacro := nil;
|
||||
EditorMacroRecorder.Clear;
|
||||
end;
|
||||
m := CurrentEditorMacroList.Macros[lbRecordedView.ItemIndex];
|
||||
CurrentEditorMacroList.Delete(lbRecordedView.ItemIndex);
|
||||
m.Free;
|
||||
UpdateDisplay;
|
||||
end;
|
||||
end;
|
||||
@ -874,7 +878,7 @@ begin
|
||||
FImageErr := IDEImages.LoadImage(16, 'state_error');
|
||||
FIsPlaying := False;
|
||||
|
||||
UpdateButtons;
|
||||
UpdateDisplay;
|
||||
end;
|
||||
|
||||
{ TEditorMacroList }
|
||||
|
Loading…
Reference in New Issue
Block a user