* Fix multiselect with toFullRowDrag. Issue 25894

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3215 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
blikblum
2014-06-22 14:54:09 +00:00
parent f445c638b8
commit ce3cb495c0
2 changed files with 21 additions and 2 deletions

View File

@ -20945,6 +20945,15 @@ begin
MultiSelect := toMultiSelect in FOptions.FSelectionOptions; MultiSelect := toMultiSelect in FOptions.FSelectionOptions;
ShiftEmpty := ShiftState = []; ShiftEmpty := ShiftState = [];
NodeSelected := IsAnyHit and (vsSelected in HitInfo.HitNode.States); NodeSelected := IsAnyHit and (vsSelected in HitInfo.HitNode.States);
if MultiSelect then
begin
// If MultiSelect is selected we will start a full row drag only in case a label was hit,
// otherwise a multi selection will start.
FullRowDrag := (toFullRowDrag in FOptions.FMiscOptions) and IsCellHit and
not (hiNowhere in HitInfo.HitPositions) and
(NodeSelected or (hiOnItemLabel in HitInfo.HitPositions) or (hiOnNormalIcon in HitInfo.HitPositions))
end
else // No MultiSelect, hence we can start a drag anywhere in the row.
FullRowDrag := toFullRowDrag in FOptions.FMiscOptions; FullRowDrag := toFullRowDrag in FOptions.FMiscOptions;
IsHeightTracking := (Message.Msg = LM_LBUTTONDOWN) and IsHeightTracking := (Message.Msg = LM_LBUTTONDOWN) and
(toNodeHeightResize in FOptions.FMiscOptions) and (hiOnItem in HitInfo.HitPositions) and (toNodeHeightResize in FOptions.FMiscOptions) and (hiOnItem in HitInfo.HitPositions) and

View File

@ -21226,7 +21226,17 @@ begin
MultiSelect := toMultiSelect in FOptions.FSelectionOptions; MultiSelect := toMultiSelect in FOptions.FSelectionOptions;
ShiftEmpty := ShiftState = []; ShiftEmpty := ShiftState = [];
NodeSelected := IsAnyHit and (vsSelected in HitInfo.HitNode.States); NodeSelected := IsAnyHit and (vsSelected in HitInfo.HitNode.States);
if MultiSelect then
begin
// If MultiSelect is selected we will start a full row drag only in case a label was hit,
// otherwise a multi selection will start.
FullRowDrag := (toFullRowDrag in FOptions.FMiscOptions) and IsCellHit and
not (hiNowhere in HitInfo.HitPositions) and
(NodeSelected or (hiOnItemLabel in HitInfo.HitPositions) or (hiOnNormalIcon in HitInfo.HitPositions))
end
else // No MultiSelect, hence we can start a drag anywhere in the row.
FullRowDrag := toFullRowDrag in FOptions.FMiscOptions; FullRowDrag := toFullRowDrag in FOptions.FMiscOptions;
IsHeightTracking := (Message.Msg = LM_LBUTTONDOWN) and IsHeightTracking := (Message.Msg = LM_LBUTTONDOWN) and
(hiOnItem in HitInfo.HitPositions) and (hiOnItem in HitInfo.HitPositions) and
([hiUpperSplitter, hiLowerSplitter] * HitInfo.HitPositions <> []); ([hiUpperSplitter, hiLowerSplitter] * HitInfo.HitPositions <> []);