Skip to content

Commit 48a976f

Browse files
committed
Exclude Qt6 from IMAGEVIEW_DIRECTUPDATE and IMAGEVIEW_QUICKUPDATE
Qt6, like Qt5, requires all painting to go through the standard event loop via paintEvent(). The IMAGEVIEW_DIRECTUPDATE and IMAGEVIEW_QUICKUPDATE optimizations bypass this, causing sluggish rendering and UI glitches when editing or zooming. The original code excluded Qt5 but not Qt6, which was added to Lazarus after this code was written (2020). Qt documentation confirms Qt6 maintains the same paint model as Qt5, with repaint() being deprecated in favor of update() for event-driven painting.
1 parent 365ba1b commit 48a976f

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

lazpaint/uimageview.pas

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
unit UImageView;
33

44
{$mode objfpc}{$H+}
5-
{$IF defined(LINUX) and not defined(LCLqt5)}{$DEFINE IMAGEVIEW_DIRECTUPDATE}{$ENDIF}
5+
{$IF defined(LINUX) and not defined(LCLqt5) and not defined(LCLqt6)}{$DEFINE IMAGEVIEW_DIRECTUPDATE}{$ENDIF}
66
{$DEFINE DRAW_TOOL_OUTSIDE_IMAGE}
7-
{$IF not defined(DARWIN) and not defined(LCLqt5)}{$DEFINE IMAGEVIEW_QUICKUPDATE}{$ENDIF}
7+
{$IF not defined(DARWIN) and not defined(LCLqt5) and not defined(LCLqt6)}{$DEFINE IMAGEVIEW_QUICKUPDATE}{$ENDIF}
88

99
interface
1010

0 commit comments

Comments
 (0)