Fix an issue when switch between plugin with icons and without icons.

This commit is contained in:
qianlifeng 2014-07-17 18:51:34 +08:00
parent 39aadaa220
commit 4f8c6e64fb
4 changed files with 6 additions and 3 deletions

View File

@ -19,6 +19,7 @@ namespace Wox.Plugin.SystemPlugins
{
get
{
if (string.IsNullOrEmpty(IcoPath)) return string.Empty;
if (IcoPath.StartsWith("data:"))
{
return IcoPath;

View File

@ -45,6 +45,8 @@ namespace Wox.Plugin
{
get
{
if (string.IsNullOrEmpty(IcoPath)) return string.Empty;
if (IcoPath.StartsWith("data:"))
{
return IcoPath;

View File

@ -14,6 +14,7 @@ namespace Wox.Plugin {
{
get
{
if (string.IsNullOrEmpty(IcoPath)) return string.Empty;
if (IcoPath.StartsWith("data:"))
{
return IcoPath;

View File

@ -414,8 +414,7 @@ namespace Wox
pluginAuthor.Text = "By: " + pair.Metadata.Author;
pluginSubTitle.Text = pair.Metadata.Description;
pluginId = pair.Metadata.ID;
SyntaxSugars.CallOrRescueDefault(
() => pluginIcon.Source = ImageLoader.Load(pair.Metadata.FullIcoPath));
pluginIcon.Source = ImageLoader.Load(pair.Metadata.FullIcoPath);
}
else
{
@ -432,7 +431,7 @@ namespace Wox
tbOpenPluginDirecoty.Visibility = Visibility.Collapsed;
pluginActionKeywordTitle.Visibility = Visibility.Collapsed;
pluginTitle.Cursor = Cursors.Arrow;
SyntaxSugars.CallOrRescueDefault(() => pluginIcon.Source = ImageLoader.Load(sys.FullIcoPath));
pluginIcon.Source = ImageLoader.Load(sys.FullIcoPath);
}
}