From c4c93604059caab7a7e13a266547eae8681a5acb Mon Sep 17 00:00:00 2001 From: naru Date: Mon, 14 Oct 2002 16:10:34 +0000 Subject: [PATCH] Log listview scrolls to top when a bottle arrives --- bottleclient/LogForm.pas | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/bottleclient/LogForm.pas b/bottleclient/LogForm.pas index 0ee7dbb..2257ec7 100755 --- a/bottleclient/LogForm.pas +++ b/bottleclient/LogForm.pas @@ -128,6 +128,7 @@ begin lvwLog.Selected := lvwLog.Items[Sel + 1]; lvwLog.Selected.Focused := true; end; + ListView_Scroll(lvwLog.Handle, 0, High(integer)); lvwLog.OnChange := lvwLogChange; end; @@ -145,6 +146,7 @@ begin lvwLog.Selected := lvwLog.Items[Sel + 1]; lvwLog.Selected.Focused := true; end; + ListView_Scroll(lvwLog.Handle, 0, High(integer)); lvwLog.OnChange := lvwLogChange; end; @@ -398,7 +400,9 @@ procedure TfrmLog.SetBottleStatusToOpened(const MID: String); begin if BottleLog.Bottle(MID) <> nil then begin BottleLog.Bottle(MID).State := lsOpened; + lvwLog.OnChange := nil; lvwLog.Invalidate; + lvwLog.OnChange := lvwLogChange; end; end; @@ -406,7 +410,9 @@ procedure TfrmLog.SetBottleStatusToPlaying(const MID: String); begin if BottleLog.Bottle(MID) <> nil then begin BottleLog.Bottle(MID).State := lsPlaying; + lvwLog.OnChange := nil; lvwLog.Invalidate; + lvwLog.OnChange := lvwLogChange; end; end; -- 2.11.0