Skip to content

Commit

Permalink
fix delete mangalist
Browse files Browse the repository at this point in the history
  • Loading branch information
riderkick committed Jan 30, 2018
1 parent 4058a67 commit 3ade68b
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions mangadownloader/forms/frmMain.pas
Original file line number Diff line number Diff line change
Expand Up @@ -3303,15 +3303,17 @@ procedure TMainForm.miMangaListDeleteClick(Sender: TObject);
while Assigned(Node) do
begin
if dataProcess.DeleteData(Node^.Index) then
begin
Inc(DeleteCount);
Node := vtMangaList.GetPreviousSelected(Node);
vtMangaList.DeleteNode(Node);
end;
Node := vtMangaList.GetPreviousSelected(nil);
end;
dataProcess.Table.ApplyUpdates;
dataProcess.Table.SQLTransaction.CommitRetaining;
if DeleteCount <> 0 then
begin
vtMangaList.ClearSelection;
vtMangaList.RootNodeCount := dataProcess.RecordCount;
UpdateVtMangaListFilterStatus;
end;
finally
Expand Down

0 comments on commit 3ade68b

Please sign in to comment.