From 930395b8aa5d9c0bb1cf6362d0a107fd1b76b8cc Mon Sep 17 00:00:00 2001 From: riderkick Date: Mon, 27 Jul 2015 09:39:50 +0800 Subject: [PATCH] mainform, always close dataprocess when selected website changed --- mangadownloader/forms/frmMain.pas | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/mangadownloader/forms/frmMain.pas b/mangadownloader/forms/frmMain.pas index b0f441a0c..c15d705e2 100644 --- a/mangadownloader/forms/frmMain.pas +++ b/mangadownloader/forms/frmMain.pas @@ -2130,9 +2130,12 @@ procedure TMainForm.cbSelectMangaChange(Sender: TObject); if currentWebsite <> cbSelectManga.Items[cbSelectManga.ItemIndex] then begin currentWebsite := cbSelectManga.Items[cbSelectManga.ItemIndex]; - if dataProcess = nil then - dataProcess := TDBDataProcess.Create; vtMangaList.Clear; + if dataProcess = nil then + dataProcess := TDBDataProcess.Create + else + if dataProcess.Connected then + dataProcess.Close; lbMode.Caption := Format(RS_ModeAll, [0]); if DataFileExist(cbSelectManga.Items[cbSelectManga.ItemIndex]) then begin