mirror of
https://github.com/HeidiSQL/HeidiSQL.git
synced 2025-08-14 01:56:36 +08:00
Avoid endless loop in SQL help topics tree on broken help tables, by displaying a category node as topic item if has the same name as its parent category. Fixes issue #1988.
This commit is contained in:
@ -120,7 +120,7 @@ begin
|
|||||||
Results := Mainform.Connection.GetResults( 'HELP "'+topic+'"' );
|
Results := Mainform.Connection.GetResults( 'HELP "'+topic+'"' );
|
||||||
while not Results.Eof do begin
|
while not Results.Eof do begin
|
||||||
tnode := treeTopics.Items.AddChild( ParentNode, Results.Col('name'));
|
tnode := treeTopics.Items.AddChild( ParentNode, Results.Col('name'));
|
||||||
if Results.ColExists('is_it_category') and (Results.Col('is_it_category') = 'Y') then begin
|
if (Results.Col('is_it_category', True) = 'Y') and ((ParentNode = nil) or (ParentNode.Text <> tnode.Text)) then begin
|
||||||
tnode.ImageIndex := ICONINDEX_CATEGORY_CLOSED;
|
tnode.ImageIndex := ICONINDEX_CATEGORY_CLOSED;
|
||||||
tnode.SelectedIndex := ICONINDEX_CATEGORY_OPENED;
|
tnode.SelectedIndex := ICONINDEX_CATEGORY_OPENED;
|
||||||
// Add a dummy item to show the plus-button so the user sees that there this
|
// Add a dummy item to show the plus-button so the user sees that there this
|
||||||
|
Reference in New Issue
Block a user