OSDN Git Service

キャビネットに履歴を表示しているとログを削除しても、キャビネットに残りつづけて
authorh677 <h677>
Sun, 25 Jun 2006 13:14:35 +0000 (13:14 +0000)
committerh677 <h677>
Sun, 25 Jun 2006 13:14:35 +0000 (13:14 +0000)
クリックしてエラーになる不具合の修正

Giko.dfm
Giko.pas
GikoDataModule.pas

index 42138f8..d518c4f 100644 (file)
--- 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
index f3e323b..a5a71f6 100644 (file)
--- a/Giko.pas
+++ b/Giko.pas
@@ -3082,12 +3082,27 @@ end;
 procedure TGikoForm.DeleteHistory( threadItem: TThreadItem );
 var
        i: Integer;
-begin
+       node: TTreeNode;
+begin
+       // \83L\83\83\83r\83l\83b\83g\82É\97\9a\97ð\82ª\95\\8e¦\82³\82ê\82Ä\82¢\82½\82ç\81A
+       // \83L\83\83\83r\83l\83b\83g\93à\82Ì\83A\83C\83e\83\80\82à\8dí\8f\9c\82·\82é\81B
+       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;
index e1fbc19..664923c 100644 (file)
@@ -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;