Skip to content

Commit 0d1f55e

Browse files
committed
新建节点, 编辑节点后, 列表显示操作过的节点
1 parent 263a48c commit 0d1f55e

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

v2rayN/Forms/MainForm.cs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -558,6 +558,15 @@ private void ShowServerForm(int configType, int index)
558558
RefreshServers();
559559
LoadV2ray();
560560
}
561+
562+
// 如果新建节点, 选择节点列表的末尾
563+
if (index < 0)
564+
{
565+
index = lvServers.Items.Count - 1;
566+
}
567+
// 修改节点后, 让节点选中, 并显示在可见区域中
568+
lvServers.Items[index].Selected = true;
569+
lvServers.EnsureVisible(index);
561570
}
562571

563572

0 commit comments

Comments
 (0)