mirror of
https://github.com/HeidiSQL/HeidiSQL.git
synced 2025-08-14 01:56:36 +08:00
Attempt to fix out-of-range error in TMainForm.tabsetQueryMouseMove
This commit is contained in:
@ -7874,6 +7874,7 @@ var
|
||||
Tabs: TTabSet;
|
||||
Rect: TRect;
|
||||
Org: TPoint;
|
||||
QueryTab: TQueryTab;
|
||||
ResultTab: TResultTab;
|
||||
HintSQL: TStringList;
|
||||
begin
|
||||
@ -7889,12 +7890,15 @@ begin
|
||||
// Check if user wants these balloon hints
|
||||
if not AppSettings.ReadBool(asHintsOnResultTabs) then
|
||||
Exit;
|
||||
QueryTab := ActiveQueryTab;
|
||||
if idx >= QueryTab.ResultTabs.Count then
|
||||
Exit;
|
||||
|
||||
// Make SQL readable for the tooltip balloon. WrapText() is unsuitable here.
|
||||
// See issue #2014
|
||||
// Also, wee need to work around the awful looking balloon text:
|
||||
// http://qc.embarcadero.com/wc/qcmain.aspx?d=73771
|
||||
ResultTab := ActiveQueryTab.ResultTabs[idx];
|
||||
ResultTab := QueryTab.ResultTabs[idx];
|
||||
HintSQL := TStringList.Create;
|
||||
HintSQL.Text := Trim(ResultTab.Results.SQL);
|
||||
for i:=0 to HintSQL.Count-1 do begin
|
||||
|
Reference in New Issue
Block a user