From 9dc9fb808fcb866b1ca6616120a2fbd421fd6cf8 Mon Sep 17 00:00:00 2001 From: mattias Date: Sat, 17 Aug 2002 23:41:06 +0000 Subject: [PATCH] improved icons, started codeexplorer git-svn-id: trunk@2192 - --- designer/designer.pp | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/designer/designer.pp b/designer/designer.pp index a8138dbb33..75b3a68997 100644 --- a/designer/designer.pp +++ b/designer/designer.pp @@ -542,9 +542,7 @@ Begin Writeln(', No CTRL down'); {$ENDIF} - SelectedCompClass:=nil; - if Assigned(FOnGetSelectedComponentClass) then - FOnGetSelectedComponentClass(Self,SelectedCompClass); + SelectedCompClass:=GetSelectedComponentClass; NonVisualComp:=NonVisualComponentAtPos(MouseDownPos.X,MouseDownPos.Y); if NonVisualComp<>nil then MouseDownComponent:=NonVisualComp; @@ -558,11 +556,12 @@ Begin if SelectedCompClass = nil then begin // selection mode if ControlSelection.ActiveGrabber=nil then begin + // no grabber resizing CompIndex:=ControlSelection.IndexOf(MouseDownComponent); if (TheMessage.Keys and MK_SHIFT)>0 then begin - // shift key pressed (multiselection) + if CompIndex<0 then begin // not selected // add component to selection @@ -582,8 +581,8 @@ Begin InvalidateWithParent(MouseDownComponent); end; end else begin - // no shift key (single selection) + if (CompIndex<0) then begin // select only this component @@ -800,13 +799,11 @@ Begin ControlSelection.ActiveGrabber:=nil; RubberBandWasActive:=ControlSelection.RubberBandActive; - - GetShift; - - MouseUpPos:=GetFormRelativeMousePosition(Form); - SelectedCompClass:=GetSelectedComponentClass; + GetShift; + MouseUpPos:=GetFormRelativeMousePosition(Form); + {$IFDEF VerboseDesigner} writeln('************************************************************'); write('MouseUpOnControl'); @@ -923,9 +920,11 @@ begin FCustomForm.Invalidate; if Assigned(OnModified) then OnModified(Self); end else begin + // no grabber resizing if (not ComponentIsTopLvl(MouseDownComponent)) and (ControlSelection.Count>=1) - and not (ControlSelection[0].Component is TCustomForm) then + and not (ControlSelection.IsSelected(Form)) + and (GetSelectedComponentClass=nil) then begin // move selection if not (dfHasSized in FFlags) then begin