From b58a1edfb6f7d4cfe73251e03381bc2b473ae858 Mon Sep 17 00:00:00 2001 From: zeljko Date: Sat, 11 Apr 2020 16:26:48 +0000 Subject: [PATCH] Qt: beginUpdate & endUpdate for scrollarea too. git-svn-id: trunk@62946 - --- lcl/interfaces/qt/qtwidgets.pas | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/lcl/interfaces/qt/qtwidgets.pas b/lcl/interfaces/qt/qtwidgets.pas index 905f78beec..c465af497c 100644 --- a/lcl/interfaces/qt/qtwidgets.pas +++ b/lcl/interfaces/qt/qtwidgets.pas @@ -660,6 +660,10 @@ type ScrollArea: TQtWindowArea; {$ENDIF} destructor Destroy; override; + + procedure BeginUpdate; override; + procedure EndUpdate; override; + procedure Activate; override; function CanAdjustClientRectOnResize: Boolean; override; function getAcceptDropFiles: Boolean; override; @@ -4347,8 +4351,8 @@ begin InResizeEvent := True; try // do not loop with LCL but do not apply it to TQtMainWindow ! - if not (csDesigning in LCLObject.ComponentState) then - if not (ClassType = TQtMainWindow) and InUpdate then + if not (csDesigning in LCLObject.ComponentState) and + not ((ClassType = TQtMainWindow) or (ClassType = TQtWindowArea)) and InUpdate then begin AQtClientRect := Rect(0, 0, 0, 0); if FOwner <> nil then @@ -7164,6 +7168,20 @@ begin inherited Destroy; end; +procedure TQtMainWindow.BeginUpdate; +begin + inherited BeginUpdate; + if Assigned(ScrollArea) then + ScrollArea.BeginUpdate; +end; + +procedure TQtMainWindow.EndUpdate; +begin + if Assigned(ScrollArea) then + ScrollArea.EndUpdate; + inherited EndUpdate; +end; + procedure TQtMainWindow.Activate; begin if IsMDIChild then