Browse Source

Merge pull request #2543 from Stzx/master

[fixes #2542] Fix accidental index invalidation
tags/4.1.8.0
Allen Zhu GitHub 5 years ago
parent
commit
25e2b82a4a
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 2 deletions
  1. +3
    -2
      shadowsocks-csharp/View/ConfigForm.cs

+ 3
- 2
shadowsocks-csharp/View/ConfigForm.cs View File

@@ -1,6 +1,7 @@
using System;
using System;
using System.Drawing;
using System.Windows.Forms;
using Shadowsocks.Controller;
using Shadowsocks.Model;
using Shadowsocks.Properties;
@@ -157,7 +158,7 @@ namespace Shadowsocks.View
LoadServerNameListToUI(_modifiedConfiguration);
_lastSelectedIndex = (ServersListBox.SelectedIndex = lastIndex);
_lastSelectedIndex = (ServersListBox.SelectedIndex = ( _lastSelectedIndex == ServersListBox.Items.Count ? lastIndex : lastIndex - 1));
ServersListBox.SelectedIndexChanged += ServersListBox_SelectedIndexChanged;
return true;


Loading…
Cancel
Save