diff --git a/designer/designer.pp b/designer/designer.pp index 441974431b..867402febe 100644 --- a/designer/designer.pp +++ b/designer/designer.pp @@ -1881,8 +1881,7 @@ begin {$ENDIF} end; -procedure TDesigner.MouseUpOnControl(Sender : TControl; - var TheMessage:TLMMouse); +procedure TDesigner.MouseUpOnControl(Sender : TControl; var TheMessage:TLMMouse); var NewLeft, NewTop, NewWidth, NewHeight: Integer; Button: TMouseButton; @@ -2000,7 +1999,6 @@ var // modified Modified; - // set initial properties if NewComponent is TControl then begin NewControl:=TControl(NewComponent); @@ -2109,8 +2107,7 @@ begin SetCaptureControl(nil); - // check if the message is for the designed form - // and there was a mouse down before + // check if the message is for the designed form and there was a mouse down before DesignSender:=GetDesignControl(Sender); SenderParentForm:=GetParentForm(DesignSender); //DebugLn(['TDesigner.MouseUpOnControl DesignSender=',dbgsName(DesignSender),' SenderParentForm=',dbgsName(SenderParentForm),' ',TheMessage.XPos,',',TheMessage.YPos]); @@ -2198,13 +2195,11 @@ begin end; DisableRubberBand; - LastMouseMovePos.X:=-1; - if (not ControlSelection.OnlyVisualComponentsSelected and ShowComponentCaptions) or - (dfHasSized in FFlags) then + if (not ControlSelection.OnlyVisualComponentsSelected and ShowComponentCaptions) + or (dfHasSized in FFlags) then Form.Invalidate; Exclude(FFlags,dfHasSized); - MouseDownComponent:=nil; MouseDownSender:=nil; {$IFDEF VerboseDesigner} diff --git a/ide/main.pp b/ide/main.pp index 773a769bd2..a05a887bc4 100644 --- a/ide/main.pp +++ b/ide/main.pp @@ -1809,7 +1809,8 @@ begin SaveIncludeLinks; InputHistories.Save; PkgBoss.SaveSettings; - if TheControlSelection<>nil then TheControlSelection.Clear; + if TheControlSelection<>nil then + TheControlSelection.Clear; FreeIDEWindows; end; @@ -9102,10 +9103,8 @@ begin exit; end; - if (AnUnitInfo.Component<>nil) - and (FLastFormActivated<>nil) - and (TDesigner(FLastFormActivated.Designer).LookupRoot=AnUnitInfo.Component) - then + if (AnUnitInfo.Component<>nil) and (FLastFormActivated<>nil) + and (TDesigner(FLastFormActivated.Designer).LookupRoot=AnUnitInfo.Component) then FLastFormActivated:=nil; // save some meta data of the source