From 40944fda80eac136e6c64f2c5fe8a0f639b39ce4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=A7=A6=E5=AE=87=E8=88=AA?= Date: Mon, 24 Apr 2017 16:01:10 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A4=9A=E9=80=89=E7=9A=84=E6=97=B6=E5=80=99di?= =?UTF-8?q?sable=E5=A4=8D=E5=88=B6=E6=8C=89=E9=92=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ShadowsocksX-NG/PreferencesWindowController.swift | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ShadowsocksX-NG/PreferencesWindowController.swift b/ShadowsocksX-NG/PreferencesWindowController.swift index bcf4001..f64b12a 100644 --- a/ShadowsocksX-NG/PreferencesWindowController.swift +++ b/ShadowsocksX-NG/PreferencesWindowController.swift @@ -371,6 +371,11 @@ class PreferencesWindowController: NSWindowController func tableViewSelectionDidChange(_ notification: Notification) { if profilesTableView.selectedRow >= 0 { bindProfile(profilesTableView.selectedRow) + if (profilesTableView.selectedRowIndexes.count > 1){ + duplicateProfileButton.isEnabled = false + } else { + duplicateProfileButton.isEnabled = true + } } else { if !profileMgr.profiles.isEmpty { let index = IndexSet(integer: profileMgr.profiles.count - 1)