mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-09 21:35:57 +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;
|
end;
|
||||||
|
|
||||||
procedure TMacroListView.btnDeleteClick(Sender: TObject);
|
procedure TMacroListView.btnDeleteClick(Sender: TObject);
|
||||||
|
var
|
||||||
|
m: TEditorMacro;
|
||||||
begin
|
begin
|
||||||
if lbRecordedView.ItemIndex < 0 then exit;
|
if lbRecordedView.ItemIndex < 0 then exit;
|
||||||
if MessageDlg(lisDeleteSelectedMacro, mtConfirmation, [mbYes, mbNo], 0) = mrYes
|
if MessageDlg(lisDeleteSelectedMacro, mtConfirmation, [mbYes, mbNo], 0) = mrYes
|
||||||
@ -617,7 +619,9 @@ begin
|
|||||||
CurrentActiveMacro := nil;
|
CurrentActiveMacro := nil;
|
||||||
EditorMacroRecorder.Clear;
|
EditorMacroRecorder.Clear;
|
||||||
end;
|
end;
|
||||||
|
m := CurrentEditorMacroList.Macros[lbRecordedView.ItemIndex];
|
||||||
CurrentEditorMacroList.Delete(lbRecordedView.ItemIndex);
|
CurrentEditorMacroList.Delete(lbRecordedView.ItemIndex);
|
||||||
|
m.Free;
|
||||||
UpdateDisplay;
|
UpdateDisplay;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
@ -874,7 +878,7 @@ begin
|
|||||||
FImageErr := IDEImages.LoadImage(16, 'state_error');
|
FImageErr := IDEImages.LoadImage(16, 'state_error');
|
||||||
FIsPlaying := False;
|
FIsPlaying := False;
|
||||||
|
|
||||||
UpdateButtons;
|
UpdateDisplay;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{ TEditorMacroList }
|
{ TEditorMacroList }
|
||||||
|
Loading…
Reference in New Issue
Block a user