TreeView: Fix a possible crash in ExpandAll().

[GB.GUI.BASE]
* BUG: TreeView: Fix a possible crash in ExpandAll().
This commit is contained in:
Benoît Minisini 2023-09-06 17:57:27 +02:00
parent 1ae471db87
commit 5d2c35925b
3 changed files with 10 additions and 9 deletions

View file

@ -1,6 +1,6 @@
# Gambas Project File 3.0
Title=Common controls and classes for GUI components
Startup=FTestTreeView
Startup=FTestLabel
Icon=.hidden/window.png
Version=3.18.90
VersionFile=1

View file

@ -2,7 +2,7 @@
{ Form Form
MoveScaled(0,0,103,110)
Font = Font["DejaVu Sans,Italic,+5"]
Font = Font["DejaVu Sans,Bold"]
Spacing = True
{ Label4 Label
MoveScaled(6,13,72,9)
@ -67,8 +67,8 @@
}
{ Label9 Label
MoveScaled(14,3,35,5)
Alignment = Align.Center
Font = Font["-1"]
Border = Border.Plain
Text = ("Texte")
Text = ("Nom du paquet")
}
}

View file

@ -730,14 +730,15 @@ Public Sub _ExpandChildren()
Dim hTree As _TreeView
Dim sChild As String
Expanded_Write(True)
If Not $aChildren Then Return
Expanded_Write(True)
hTree = GetTree()
For Each sChild In $aChildren
hTree[sChild]._ExpandChildren()
Next
If $aChildren Then
For Each sChild In $aChildren
hTree[sChild]._ExpandChildren()
Next
Endif
End