OSDN Git Service

Activating tab when TBottleLogList first added
authornaru <bottle@mikage.to>
Sat, 4 Jan 2003 00:23:50 +0000 (00:23 +0000)
committernaru <bottle@mikage.to>
Sat, 4 Jan 2003 00:23:50 +0000 (00:23 +0000)
bottleclient/LogForm.pas

index 427c09d..5fb1c07 100755 (executable)
@@ -144,7 +144,6 @@ procedure TfrmLog.AddCurrentScriptLog(const LogName, Script, Channel, MID, Ghost
 var Sel: integer;
 begin
   BottleLogTitled(LogName).AddScriptLog(Script, Channel, MID, Ghost);
-  if FBottleLogList.Count = 1 then tabBottleLog.TabIndex := 0;
   if SelectedBottleLog <> BottleLogTitled(LogName) then Exit;
   lvwLog.OnChange := nil; //\83C\83x\83\93\83g\94­\90¶(\82¢\82ë\82¢\82ë\8dÄ\95`\89æ\82ª\8bN\82«\82é)\82Ì\97}\90§
   if lvwLog.Selected <> nil then Sel := lvwLog.Selected.Index else Sel := -1;
@@ -163,7 +162,6 @@ procedure TfrmLog.AddCurrentSystemLog(const LogName, MessageString: String);
 var Sel: integer;
 begin
   BottleLogTitled(LogName).AddSystemLog(MessageString);
-  if FBottleLogList.Count = 1 then tabBottleLog.TabIndex := 0;
   if SelectedBottleLog <> BottleLogTitled(LogName) then Exit;
   lvwLog.OnChange := nil;
   if lvwLog.Selected <> nil then Sel := lvwLog.Selected.Index else Sel := -1;
@@ -1030,6 +1028,7 @@ begin
   Result := TBottleLogList.Create(LogName); // \90V\82µ\82­\8dì\82é
   FBottleLogList.Add(Result);
   UpdateTab;
+  if FBottleLogList.Count = 1 then tabBottleLog.TabIndex := 0;
 end;
 
 procedure TfrmLog.AllBottleOpened;