From 1b95312ed1c728dbe16f62a8c6917525a8882135 Mon Sep 17 00:00:00 2001 From: paul Date: Thu, 1 Oct 2009 02:47:11 +0000 Subject: [PATCH] designer: formatting git-svn-id: trunk@21933 - --- designer/designer.pp | 31 ++++++++++++++++++++----------- 1 file changed, 20 insertions(+), 11 deletions(-) diff --git a/designer/designer.pp b/designer/designer.pp index b45b884045..e0f15029e7 100644 --- a/designer/designer.pp +++ b/designer/designer.pp @@ -1909,9 +1909,8 @@ var procedure DisableRubberBand; begin - if ControlSelection.RubberbandActive then begin - ControlSelection.RubberbandActive:=false; - end; + if ControlSelection.RubberbandActive then + ControlSelection.RubberbandActive := False; end; var @@ -1952,30 +1951,40 @@ begin DebugLn(''); {$ENDIF} - if Mediator<>nil then begin + if Mediator<>nil then + begin Handled:=false; Mediator.MouseUp(Button,Shift,MouseUpPos,Handled); if Handled then exit; end; - if Button=mbLeft then begin - if SelectedCompClass = nil then begin + if Button=mbLeft then + begin + if SelectedCompClass = nil then + begin // layout mode (selection, moving and resizing) - if not (dfHasSized in FFlags) then begin + if not (dfHasSized in FFlags) then + begin // new selection - if RubberBandWasActive then begin + if RubberBandWasActive then + begin // rubberband selection RubberbandSelect; - end else begin + end else + begin // point selection PointSelect; end; end; - end else begin + end else + begin // create new a component on the form AddComponent; end; - end else if Button=mbRight then begin + end + else + if Button=mbRight then + begin // right click -> popup menu DisableRubberBand; if EnvironmentOptions.RightClickSelects