From 4da488a02b03d1e0580c5ad641e5e203ebb0e745 Mon Sep 17 00:00:00 2001 From: Andreas Schneider Date: Sat, 5 Dec 2009 00:57:55 +0100 Subject: [PATCH] - Fixed TfrmMain.OnStaticElevated to correctly handle off-screen updates --- Client/UfrmMain.pas | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/Client/UfrmMain.pas b/Client/UfrmMain.pas index 55d8c0a..52f252b 100644 --- a/Client/UfrmMain.pas +++ b/Client/UfrmMain.pas @@ -2096,10 +2096,16 @@ begin end; procedure TfrmMain.OnStaticElevated(AStaticItem: TStaticItem); +var + blockInfo: PBlockInfo; begin AStaticItem.PrioritySolver := FScreenBuffer.GetSerial; - PrepareScreenBlock(FScreenBuffer.UpdateSortOrder(AStaticItem)); - Exclude(FScreenBufferState, sbsIndexed); + blockInfo := FScreenBuffer.UpdateSortOrder(AStaticItem); + if blockInfo <> nil then + begin + PrepareScreenBlock(blockInfo); + Exclude(FScreenBufferState, sbsIndexed); + end; end; procedure TfrmMain.OnStaticHued(AStaticItem: TStaticItem);