mirror of
https://github.com/HeidiSQL/HeidiSQL.git
synced 2025-08-16 11:42:12 +08:00
Display help text for SQL function as tooltip hint in query helpers tree.
This commit is contained in:
@ -7785,18 +7785,37 @@ procedure TMainForm.AnyGridGetHint(Sender: TBaseVirtualTree; Node:
|
||||
TVTTooltipLineBreakStyle; var HintText: String);
|
||||
var
|
||||
Tree: TVirtualStringTree;
|
||||
NewHint: String;
|
||||
begin
|
||||
// Disable tooltips on Wine, as they prevent users from clicking + editing clipped cells
|
||||
if not FIsWine then begin
|
||||
if FIsWine then
|
||||
Exit;
|
||||
|
||||
Tree := TVirtualStringTree(Sender);
|
||||
|
||||
if Tree = ActiveQueryHelpers then begin
|
||||
case Sender.GetNodeLevel(Node) of
|
||||
1: case Node.Parent.Index of
|
||||
HELPERNODE_FUNCTIONS: begin
|
||||
NewHint := MySQLFunctions[Node.Index].Name + MySQLFunctions[Node.Index].Declaration +
|
||||
':' + sLineBreak + MySQLFunctions[Node.Index].Description;
|
||||
if not NewHint.IsEmpty then begin
|
||||
HintText := NewHint;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
if HintText.IsEmpty then begin
|
||||
HintText := Tree.Text[Node, Column];
|
||||
HintText := sstr(HintText, SIZE_KB);
|
||||
end;
|
||||
// See http://www.heidisql.com/forum.php?t=20458#p20548
|
||||
if Sender = DBtree then
|
||||
LineBreakStyle := hlbForceSingleLine
|
||||
else
|
||||
LineBreakStyle := hlbForceMultiLine;
|
||||
end;
|
||||
end;
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user