Qt: beginUpdate & endUpdate for scrollarea too.

git-svn-id: trunk@62946 -
This commit is contained in:
zeljko 2020-04-11 16:26:48 +00:00
parent 20ca27b476
commit b58a1edfb6

View File

@ -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