IDE: find in files dlg: fixed double click recognition, bug #19059

git-svn-id: trunk@30448 -
This commit is contained in:
mattias 2011-04-24 09:01:34 +00:00
parent b3fbf217ee
commit 3df702a7d4

View File

@ -169,7 +169,7 @@ type
procedure SearchInListEditKeyDown(Sender: TObject; var Key: Word; procedure SearchInListEditKeyDown(Sender: TObject; var Key: Word;
Shift: TShiftState ); Shift: TShiftState );
procedure FilterButtonClick (Sender: TObject ); procedure FilterButtonClick (Sender: TObject );
procedure TreeViewMouseUp(Sender: TObject; Button: TMouseButton; procedure TreeViewMouseDown(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer); Shift: TShiftState; X, Y: Integer);
private private
FMaxItems: integer; FMaxItems: integer;
@ -565,7 +565,7 @@ begin
end;//End if Assigned(CurrentTV) end;//End if Assigned(CurrentTV)
end; end;
procedure TSearchResultsView.TreeViewMouseUp(Sender: TObject; procedure TSearchResultsView.TreeViewMouseDown(Sender: TObject;
Button: TMouseButton; Shift: TShiftState; X, Y: Integer); Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
var var
TV: TCustomTreeView; TV: TCustomTreeView;
@ -576,10 +576,11 @@ begin
Node:=TV.GetNodeAt(X,Y); Node:=TV.GetNodeAt(X,Y);
if Node=nil then exit; if Node=nil then exit;
if x<Node.DisplayTextLeft then exit; if x<Node.DisplayTextLeft then exit;
if ([ssDouble,ssTriple,ssQuad]*Shift=[]) //debugln(['TSearchResultsView.TreeViewMouseDown single=',([ssDouble,ssTriple,ssQuad]*Shift<>[]),' Option=',EnvironmentOptions.MsgViewDblClickJumps]);
and EnvironmentOptions.MsgViewDblClickJumps then exit; if ([ssDouble,ssTriple,ssQuad]*Shift=[]) = EnvironmentOptions.MsgViewDblClickJumps
then exit;
if Assigned(fOnSelectionChanged) then if Assigned(fOnSelectionChanged) then
fOnSelectionChanged(Self) fOnSelectionChanged(Self);
end; end;
function TSearchResultsView.BeautifyPageName(const APageName: string): string; function TSearchResultsView.BeautifyPageName(const APageName: string): string;
@ -848,7 +849,7 @@ begin
OnShowHint:= @LazTVShowHint; OnShowHint:= @LazTVShowHint;
OnMouseMove:= @LazTVMousemove; OnMouseMove:= @LazTVMousemove;
OnMouseWheel:= @LazTVMouseWheel; OnMouseWheel:= @LazTVMouseWheel;
OnMouseUp:=@TreeViewMouseUp; OnMouseDown:=@TreeViewMouseDown;
ShowHint:= true; ShowHint:= true;
RowSelect := True; // we are using custom draw RowSelect := True; // we are using custom draw
Options := Options + [tvoAllowMultiselect] - [tvoThemedDraw]; Options := Options + [tvoAllowMultiselect] - [tvoThemedDraw];