Skip to content

Commit

Permalink
3884: Сделал принудительную инициализацию перерисовки всего битмапа п…
Browse files Browse the repository at this point in the history
…ри скрытии слоя
  • Loading branch information
zedxxx committed Feb 19, 2024
1 parent f96706d commit fc89880
Showing 1 changed file with 12 additions and 9 deletions.
21 changes: 12 additions & 9 deletions Src/MapLayers/WindowLayers/u_MapLayerBasicNoBitmap.pas
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,13 @@ procedure TMapLayerBasicNoBitmap.OnPaintLayer(
if VLocalConverter <> nil then begin
VCounterContext := FOnPaintCounter.StartOperation;
try
PaintLayer(Buffer, VLocalConverter);
if FVisible then begin
PaintLayer(Buffer, VLocalConverter);
end else begin
// initialize full redraw
// workaround for: https://www.sasgis.org/mantis/view.php?id=3884
Buffer.Changed;
end;
finally
FOnPaintCounter.FinishOperation(VCounterContext);
end;
Expand Down Expand Up @@ -208,14 +214,11 @@ procedure TMapLayerBasicNoBitmap.RedrawIfNeed;
VCounterContext: TInternalPerformanceCounterContext;
begin
if FNeedRedrawFlag.CheckFlagAndReset then begin
if FVisible then begin
FNeedRedrawFlag.CheckFlagAndReset;
VCounterContext := FRedrawCounter.StartOperation;
try
FLayer.Changed;
finally
FRedrawCounter.FinishOperation(VCounterContext);
end;
VCounterContext := FRedrawCounter.StartOperation;
try
FLayer.Changed;
finally
FRedrawCounter.FinishOperation(VCounterContext);
end;
end;
end;
Expand Down

0 comments on commit fc89880

Please sign in to comment.