mirror of
https://github.com/HeidiSQL/HeidiSQL.git
synced 2026-03-13 09:24:25 +08:00
fix: several crash causes Host subtabs when connection is lost externally
This also changes the dodgy default text "Node" in any VirtualTree's cell to "-" Refs #1875
This commit is contained in:
@@ -1532,6 +1532,7 @@ begin
|
||||
VT.EndUpdate;
|
||||
VT.TextMargin := 6;
|
||||
VT.Margin := 2;
|
||||
VT.DefaultText := '-'; // "Node" by default
|
||||
// Disable hottracking in non-Vista mode, looks ugly in XP, but nice in Vista
|
||||
if (toUseExplorerTheme in VT.TreeOptions.PaintOptions) and (Win32MajorVersion >= 6) then
|
||||
VT.TreeOptions.PaintOptions := VT.TreeOptions.PaintOptions + [toHotTrack]
|
||||
|
||||
@@ -9456,6 +9456,8 @@ begin
|
||||
if Sender = ListProcesses then begin
|
||||
Idx := Sender.GetNodeData(Node);
|
||||
Results := GridResult(Sender);
|
||||
if not Results.Connection.Active then
|
||||
Exit;
|
||||
Results.RecNo := Idx^;
|
||||
case Kind of
|
||||
ikNormal, ikSelected: begin
|
||||
@@ -9500,11 +9502,15 @@ var
|
||||
begin
|
||||
Idx := Sender.GetNodeData(Node);
|
||||
Results := GridResult(Sender);
|
||||
// See issue #3416
|
||||
if (Results = nil) and (Sender <> ListVariables) then
|
||||
Exit;
|
||||
if Results <> nil then
|
||||
|
||||
// See issue #3416. Note: ListVariables does not depend on a live result, but on a StringList.
|
||||
if Sender <> ListVariables then begin
|
||||
// See issue #1875
|
||||
if (Results = nil) or (not Results.Connection.Active) then
|
||||
Exit;
|
||||
Results.RecNo := Idx^;
|
||||
end;
|
||||
|
||||
|
||||
if (Sender = ListStatus) and (Column in [1,2,3]) then begin
|
||||
CellText := Results.Col(1);
|
||||
|
||||
Reference in New Issue
Block a user