From d83eb2450cb6ac23df5d04a51d081788a0f43a0f Mon Sep 17 00:00:00 2001 From: blikblum Date: Mon, 31 Dec 2012 14:06:40 +0000 Subject: [PATCH] * Cleanup WndProc git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@2612 8e941d3f-bd1b-0410-a28a-d453659cc2b4 --- .../branches/4.8/VirtualTrees.pas | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/components/virtualtreeview-new/branches/4.8/VirtualTrees.pas b/components/virtualtreeview-new/branches/4.8/VirtualTrees.pas index 6987ad042..d1580ebea 100644 --- a/components/virtualtreeview-new/branches/4.8/VirtualTrees.pas +++ b/components/virtualtreeview-new/branches/4.8/VirtualTrees.pas @@ -23830,11 +23830,10 @@ begin if not (csDesigning in ComponentState) and ((Message.Msg = LM_LBUTTONDOWN) or (Message.Msg = LM_LBUTTONDBLCLK)) then begin - if (DragMode = dmAutomatic) and (DragKind = dkDrag) then + Handled := (DragMode = dmAutomatic) and (DragKind = dkDrag); + if Handled then begin - if IsControlMouseMsg(TLMMouse(Message)) then - Handled := True; - if not Handled then + if not IsControlMouseMsg(TLMMouse(Message)) then begin //lclheader //let the header handle the message here @@ -23842,7 +23841,6 @@ begin FHeader.HandleMessage(Message); ControlState := ControlState + [csLButtonDown]; Dispatch(Message); // overrides TControl's BeginDrag - Handled := True; end; end; end; @@ -23851,12 +23849,7 @@ begin Handled := FHeader.HandleMessage(Message); if not Handled then - begin - //lcl: probably not necessary - //if (Message.Msg in [WM_NCLBUTTONDOWN, WM_NCRBUTTONDOWN, WM_NCMBUTTONDOWN]) and not Focused and CanFocus then - // SetFocus; inherited; - end; end; end;