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