Explorar el Código

fix update for indirect paint

Johann hace 6 años
padre
commit
8e66b2cd81
Se han modificado 1 ficheros con 5 adiciones y 2 borrados
  1. 5 2
      lazpaint/uimageview.pas

+ 5 - 2
lazpaint/uimageview.pas

@@ -565,8 +565,11 @@ begin
   if prevVSArea <> FLastPictureParameters.virtualScreenArea then
     PaintBlueAreaImplementation(ACanvasOfs, AWorkArea);
   {$ELSE}
-  InvalidateRect(AWinControl.Handle, @updateArea, false);
-  AWinControl.Update;
+  if IntersectRect(updateArea, updateArea, AWorkArea) then
+  begin
+    InvalidateRect(AWinControl.Handle, @updateArea, false);
+    AWinControl.Update;
+  end;
   {$ENDIF}
 end;