IDE: search results: when single click jumps: single selection on mouse down

git-svn-id: trunk@46505 -
This commit is contained in:
mattias 2014-10-10 00:15:54 +00:00
parent 630e8e258a
commit 2948e8db10

View File

@ -480,9 +480,15 @@ begin
if Node=nil then exit;
if x<Node.DisplayTextLeft then exit;
//debugln(['TSearchResultsView.TreeViewMouseDown single=',([ssDouble,ssTriple,ssQuad]*Shift=[]),' Option=',EnvironmentOptions.MsgViewDblClickJumps]);
if ([ssDouble,ssTriple,ssQuad]*Shift=[]) = EnvironmentOptions.MsgViewDblClickJumps
then exit;
Node.Selected:=true;
if EnvironmentOptions.MsgViewDblClickJumps then
begin
// double click jumps
if not (ssDouble in Shift) then exit;
end else begin
// single click jumps -> single selection
if ([ssDouble,ssTriple,ssQuad]*Shift<>[]) then exit;
TV.Items.SelectOnlyThis(Node);
end;
if Assigned(fOnSelectionChanged) then
fOnSelectionChanged(Self);
end;