OSDN Git Service

あるスレで個別あぼーんしたあとでスレを切り替えると、
authoryoffy <yoffy>
Thu, 21 Oct 2004 07:32:31 +0000 (07:32 +0000)
committeryoffy <yoffy>
Thu, 21 Oct 2004 07:32:31 +0000 (07:32 +0000)
個別あぼーんが継承されてしまっていたバグを修正。

AbonUnit.pas

index fd56afc..ebcc6a7 100644 (file)
@@ -680,34 +680,26 @@ var
        i : Integer;
        f : Boolean;
 begin
-       f := FileExists( SetResNumFile );
-       if f then
-               f := LoadFromSetResNumFile( SetResNumFile );
+       f := LoadFromSetResNumFile( SetResNumFile );
        FAbonRes.FFilePath := SetResNumFile;    // Learn \82Í\82Å\95Û\91\82·\82é\82Ì\82Å
        Learn( ThreadStrings );
 
-       if FileExists(SetResNumFile) = true then begin
-               if f then begin
-                       for i := 0 to FAbonRes.Count - 1 do begin
-                               if (FAbonRes[i].Res <= ThreadStrings.Count) and (FAbonRes[i].Res > 0) then begin
+       if f then begin
+               for i := 0 to FAbonRes.Count - 1 do begin
+                       if (FAbonRes[i].Res <= ThreadStrings.Count) and (FAbonRes[i].Res > 0) then begin
 {$IFDEF NO_ABON}
-                                       ThreadStrings.Strings[FAbonRes[i].Res-1] :=
-                                               '<font color="red">\82 \82Ú\81`\82ñ\8dÏ\82Ý</font>' +
-                                               ThreadStrings.Strings[FAbonRes[i].Res-1];
+                               ThreadStrings.Strings[FAbonRes[i].Res-1] :=
+                                       '<font color="red">\82 \82Ú\81`\82ñ\8dÏ\82Ý</font>' +
+                                       ThreadStrings.Strings[FAbonRes[i].Res-1];
 {$ELSE}
-                                       if FAbonRes[i].option = 0 then begin
-                                               ThreadStrings.Strings[FAbonRes[i].Res-1] := '';
-                                       end else begin
-                                               ThreadStrings.Strings[FAbonRes[i].Res-1] := '\82 \82Ú\81`\82ñ<>\82 \82Ú\81`\82ñ<>\82 \82Ú\81`\82ñ<>\82 \82Ú\81`\82ñ<>';
-                                       end;
-{$ENDIF}
+                               if FAbonRes[i].option = 0 then begin
+                                       ThreadStrings.Strings[FAbonRes[i].Res-1] := '';
+                               end else begin
+                                       ThreadStrings.Strings[FAbonRes[i].Res-1] := '\82 \82Ú\81`\82ñ<>\82 \82Ú\81`\82ñ<>\82 \82Ú\81`\82ñ<>\82 \82Ú\81`\82ñ<>';
                                end;
+{$ENDIF}
                        end;
                end;
-       end else begin
-               FIndividualFileName := SetResNumFile;
-               FAbonRes.Free;
-               FAbonRes := TIndiviAbonList.Create;
        end;
 end;
 procedure TAbon.IndividualAbon(var ResString : String; SetResNumFile : String; ResNumber : Integer);
@@ -738,10 +730,15 @@ end;
 function TAbon.LoadFromSetResNumFile(SetResNumFile : String) : Boolean;
 begin
 
+       FIndividualFileName := SetResNumFile;
        FAbonRes.Free;
        FAbonRes := TIndiviAbonList.Create;
-       FAbonRes.LoadFromFile( SetResNumFile );
-       Result := true;
+       if FileExists( SetResNumFile ) then begin
+               FAbonRes.LoadFromFile( SetResNumFile );
+               Result := true;
+       end else begin
+               Result := False;
+       end;
 
 end;
 //\8cÂ\95Ê\82 \82Ú\81`\82ñ\83t\83@\83C\83\8b\82É\92Ç\89Á