mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-18 21:42:51 +02:00
Qt: performance boost in resize() & move() when setted up from LCL.
git-svn-id: trunk@24052 -
This commit is contained in:
parent
6691b52da8
commit
d2280da4c6
@ -2668,6 +2668,10 @@ begin
|
||||
WriteLn('TQtWidget.SlotMove');
|
||||
{$endif}
|
||||
|
||||
// do not loop with LCL
|
||||
if InUpdate then
|
||||
exit;
|
||||
|
||||
if not QEvent_spontaneous(Event) or
|
||||
(not QEvent_spontaneous(Event) and
|
||||
((Self is TQtMainWindow) and not
|
||||
@ -2814,6 +2818,10 @@ begin
|
||||
);
|
||||
}
|
||||
if not Assigned(LCLObject) then exit;
|
||||
|
||||
// do not loop with LCL
|
||||
if InUpdate then
|
||||
exit;
|
||||
|
||||
if (NewSize.cx <> LCLObject.Width) or (NewSize.cy <> LCLObject.Height) or
|
||||
(LCLObject.ClientRectNeedsInterfaceUpdate) then
|
||||
|
@ -321,7 +321,6 @@ begin
|
||||
Result := False;
|
||||
if not WSCheckHandleAllocated(AWinControl, 'GetDesignInteractive') then
|
||||
Exit;
|
||||
Result := False;
|
||||
end;
|
||||
|
||||
class procedure TQtWSWinControl.SetBiDiMode(const AWinControl : TWinControl;
|
||||
@ -463,9 +462,10 @@ class procedure TQtWSWinControl.SetBounds(const AWinControl: TWinControl;
|
||||
begin
|
||||
if not WSCheckHandleAllocated(AWincontrol, 'SetBounds') then
|
||||
Exit;
|
||||
|
||||
TQtWidget(AWinControl.Handle).BeginUpdate;
|
||||
TQtWidget(AWinControl.Handle).move(ALeft, ATop);
|
||||
TQtWidget(AWinControl.Handle).resize(AWidth, AHeight);
|
||||
TQtWidget(AWinControl.Handle).EndUpdate;
|
||||
end;
|
||||
|
||||
{------------------------------------------------------------------------------
|
||||
@ -481,8 +481,10 @@ class procedure TQtWSWinControl.SetPos(const AWinControl: TWinControl;
|
||||
begin
|
||||
if not WSCheckHandleAllocated(AWincontrol, 'SetPos') then
|
||||
Exit;
|
||||
|
||||
|
||||
TQtWidget(AWinControl.Handle).BeginUpdate;
|
||||
TQtWidget(AWinControl.Handle).move(ALeft, ATop);
|
||||
TQtWidget(AWinControl.Handle).EndUpdate;
|
||||
end;
|
||||
|
||||
{------------------------------------------------------------------------------
|
||||
@ -498,8 +500,9 @@ class procedure TQtWSWinControl.SetSize(const AWinControl: TWinControl;
|
||||
begin
|
||||
if not WSCheckHandleAllocated(AWincontrol, 'SetSize') then
|
||||
Exit;
|
||||
|
||||
TQtWidget(AWinControl.Handle).BeginUpdate;
|
||||
TQtWidget(AWinControl.Handle).resize(AWidth, AHeight);
|
||||
TQtWidget(AWinControl.Handle).EndUpdate;
|
||||
end;
|
||||
|
||||
{------------------------------------------------------------------------------
|
||||
|
Loading…
Reference in New Issue
Block a user