From 6665e00e6cf997f4dceee892783d57beefe328b0 Mon Sep 17 00:00:00 2001 From: jesus Date: Thu, 27 Oct 2011 20:02:13 +0000 Subject: [PATCH] LCL, reverts r33070 #4e9eda7a16: added option to move selection with right click, issue #18115 git-svn-id: trunk@33118 - --- lcl/dbgrids.pas | 12 +++--------- lcl/grids.pas | 7 ++----- 2 files changed, 5 insertions(+), 14 deletions(-) diff --git a/lcl/dbgrids.pas b/lcl/dbgrids.pas index 37b37d327e..e4a89361da 100644 --- a/lcl/dbgrids.pas +++ b/lcl/dbgrids.pas @@ -66,9 +66,8 @@ type dgHeaderHotTracking, dgHeaderPushedLook, dgPersistentMultiSelect, - dgAutoSizeColumns, - dgCanSelectAnyButton // Any mouse button (not just left) - // moves the selection to clicked cell + dgAutoSizeColumns + ); TDbGridOptions = set of TDbGridOption; @@ -1015,11 +1014,6 @@ begin else Exclude(OldOptions, goHeaderPushedLook); - if dgCanSelectAnyButton in FOptions then - Include(OldOptions, goCanSelectAnyButton) - else - Exclude(OldOptions, goCanSelectAnyButton); - if (dgIndicator in ChangedOptions) then begin if (dgIndicator in FOptions) then FixedCols := FixedCols + 1 @@ -2232,7 +2226,7 @@ begin exit; end; - if (button<>mbLeft) and not (dgCanSelectAnyButton in FOptions) then begin + if button<>mbLeft then begin doInherited; exit; end; diff --git a/lcl/grids.pas b/lcl/grids.pas index 87f1a4b4a2..48fae36a50 100644 --- a/lcl/grids.pas +++ b/lcl/grids.pas @@ -104,9 +104,7 @@ type goHeaderPushedLook, // Header cells looks pushed when clicked goSelectionActive, // Setting grid.Selection moves also cell cursor goFixedColSizing, // Allow to resize fixed columns - goDontScrollPartCell, // clicking partially visible cells will not scroll - goCanSelectAnyButton // Not only left mouse button, but also right and - // middle buttons move selection to clicked cell + goDontScrollPartCell // clicking partially visible cells will not scroll ); TGridOptions = set of TGridOption; @@ -5720,8 +5718,7 @@ var begin inherited MouseDown(Button, Shift, X, Y); - if (csDesigning in componentState) or - not ((goCanSelectAnyButton in FOptions) or (ssLeft in Shift)) then + if (csDesigning in componentState) or not (ssLeft in Shift) then Exit; {$IfDef dbgGrid} DebugLn('MouseDown INIT'); {$Endif}