Skip to content

Commit 5faf752

Browse files
committed
Fix ListVarGui unable to display certain nodes
The node tree is created with the root node having the name of the UPS. Since UPS variables do not have the UPS name at the beginning, the UPS name had to be stripped from the node's fullpath. The Replace function was previously unlimited, which caused it to strip out the UPS name wherever it appeared in the node path. If a UPS's name was 'ups', then any variable in a 'ups' group would become unreadable. The Replace function now only removes the UPS name from the beginning of the full path.
1 parent 06204d8 commit 5faf752

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

WinNUT_V2/WinNUT-Client/List_Var_Gui.vb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ Public Class List_Var_Gui
127127
Private Sub TView_UPSVar_NodeChanged(sender As Object, e As TreeViewEventArgs) Handles TView_UPSVar.AfterSelect
128128
Dim index As Integer = 0
129129
Dim UPSName = Arr_Reg_Key.Item("UPSName")
130-
Dim SelectedChild = Replace(e.Node.FullPath, UPSName & ".", "")
130+
Dim SelectedChild = Replace(e.Node.FullPath, UPSName & ".", "", 1, 1)
131131
Dim FindChild As Predicate(Of UPS_List_Datas) = Function(ByVal x As UPS_List_Datas)
132132
If x.VarKey = SelectedChild Then
133133
Return True

0 commit comments

Comments
 (0)