From: h677 Date: Sun, 25 Jun 2006 13:14:35 +0000 (+0000) Subject: キャビネットに履歴を表示しているとログを削除しても、キャビネットに残りつづけて X-Git-Tag: v1_64_1_820~411 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=6e45a6059f0fbe49891961280ea319c05d233d28;p=gikonavigoeson%2Fgikonavi.git キャビネットに履歴を表示しているとログを削除しても、キャビネットに残りつづけて クリックしてエラーになる不具合の修正 --- diff --git a/Giko.dfm b/Giko.dfm index 42138f8..d518c4f 100644 --- a/Giko.dfm +++ b/Giko.dfm @@ -8215,7 +8215,7 @@ object GikoForm: TGikoForm end object BrowserPopupMenu: TPopupMenu Left = 68 - Top = 276 + Top = 280 object ShowThreadMenu: TMenuItem Action = GikoDM.ShowThreadAction end diff --git a/Giko.pas b/Giko.pas index f3e323b..a5a71f6 100644 --- a/Giko.pas +++ b/Giko.pas @@ -3082,12 +3082,27 @@ end; procedure TGikoForm.DeleteHistory( threadItem: TThreadItem ); var i: Integer; -begin + node: TTreeNode; +begin + // ƒLƒƒƒrƒlƒbƒg‚É—š—ð‚ª•\Ž¦‚³‚ê‚Ä‚¢‚½‚çA + // ƒLƒƒƒrƒlƒbƒg“à‚̃AƒCƒeƒ€‚àíœ‚·‚éB + if (FTreeType = gttHistory) then begin + node := TreeView.Items.GetFirstNode; + while (node <> nil) do begin + if ( TFavoriteThreadItem(node.Data).Item = threadItem ) then begin + TreeView.Items.Delete(node); + TreeView.Refresh; + node := nil; + end else begin + node := node.GetNext; + end; + end; + end; for i := 0 to FHistoryList.Count - 1 do begin - if threadItem.URL = TFavoriteThreadItem( FHistoryList.Items[i] ).URL then begin + if threadItem = TFavoriteThreadItem( FHistoryList.Items[i] ).Item then begin TFavoriteThreadItem( FHistoryList.Items[ i ] ).Free; FHistoryList.Delete(i); - FHistoryList.Capacity := FHistoryList.Count; + FHistoryList.Capacity := FHistoryList.Count; Break; end; end; diff --git a/GikoDataModule.pas b/GikoDataModule.pas index e1fbc19..664923c 100644 --- a/GikoDataModule.pas +++ b/GikoDataModule.pas @@ -1247,6 +1247,7 @@ begin if MsgBox(GikoForm.Handle, StringReplace( DEL_MSG, '^0', ThreadItem.Title, [rfReplaceAll] ) , DEL_TITLE, MB_YESNO or MB_ICONWARNING or MB_DEFBUTTON2) <> ID_YES then Exit; GikoForm.DeleteTab(TBrowserRecord(GikoForm.BrowserTab.Tabs.Objects[idx])); + GikoForm.DeleteHistory(ThreadItem); ThreadItem.DeleteLogFile; if ThreadItem.ParentBoard = GikoForm.ActiveList then GikoForm.ListView.Refresh;