TreeView: Unselectable items are now really really unselectable.

[GB.GUI.BASE]
* BUG: TreeView: Unselectable items are now really really unselectable.
This commit is contained in:
Benoît Minisini 2022-12-11 21:00:30 +01:00
parent 90c40c740e
commit 2ea4b2c24d
2 changed files with 5 additions and 8 deletions

View file

@ -54,8 +54,8 @@ Public Sub SelectItem(sKey As String, bSelected As Boolean)
Dim hParent As _TreeView = GetParent()
Dim hItem As _TreeView_Item
hItem = hParent[sKey]
If Not hItem Then Return
Try hItem = hParent[sKey]
If Error Then Return
If Not hItem.Selectable Then Return
If bSelected Then

View file

@ -1127,12 +1127,9 @@ End
Public Sub GridView_Change()
Dim hItem As _TreeView_Item
hItem = _RowToItem($hView.Row)
If Not hItem Or If Not hItem.Selectable Then
Stop Event
Return
Endif
Try hItem = _RowToItem($hView.Row)
If Not hItem Or If Not hItem.Selectable Then Stop Event
$hView.Rows[$hView.Row].EnsureVisible()
End