Add equality checking for old keyword and new keyword

This commit is contained in:
bao-qian
2015-11-13 05:14:27 +00:00
parent 3f60723425
commit f272470871

View File

@@ -257,6 +257,8 @@ namespace Wox.Core.Plugin
string msg = InternationalizationManager.Instance.GetTranslation("newActionKeywordsCannotBeEmpty"); string msg = InternationalizationManager.Instance.GetTranslation("newActionKeywordsCannotBeEmpty");
throw new WoxPluginException(plugin.Metadata.Name, msg); throw new WoxPluginException(plugin.Metadata.Name, msg);
} }
// do nothing if they are same
if (oldActionKeyword == newActionKeyword) return;
if (NonGlobalPlugins.ContainsKey(newActionKeyword)) if (NonGlobalPlugins.ContainsKey(newActionKeyword))
{ {
string msg = InternationalizationManager.Instance.GetTranslation("newActionKeywordsHasBeenAssigned"); string msg = InternationalizationManager.Instance.GetTranslation("newActionKeywordsHasBeenAssigned");