lcl: move condition to top to reduce amount of executed code

git-svn-id: trunk@36185 -
This commit is contained in:
paul 2012-03-21 02:53:00 +00:00
parent a152f6fb8f
commit d46180aa2f

View File

@ -6886,7 +6886,12 @@ var
end;
begin
if Message.WindowPos=nil then exit;
if not Assigned(Message.WindowPos) or
((Message.WindowPos^.flags and SWP_SourceIsInterface) = 0) then
begin
inherited WMWindowPosChanged(Message);
Exit;
end;
{$IFDEF VerboseAllAutoSize}
DebugLn(DbgSName(Self) + ' : ' + DbgSWindowPosFlags(Message.WindowPos^.flags));
@ -6905,12 +6910,6 @@ begin
' BoundsRealized=',dbgs(FBoundsRealized),' FromIntf=',(Message.WindowPos^.flags and SWP_SourceIsInterface)>0,' ClientRectInvalid=',ClientRectNeedsInterfaceUpdate]);
{$ENDIF}
if (Message.WindowPos=nil) or ((Message.WindowPos^.flags and SWP_SourceIsInterface) = 0) then
begin
inherited WMWindowPosChanged(Message);
exit;
end;
// interface widget has moved/resized
// -> update realized bounds
{$IFDEF VerboseAllAutoSize}