http://bugs.gentoo.org/show_bug.cgi?id=248634 http://bugzilla.gnome.org/show_bug.cgi?id=557793 From efe65ac1c3ee8f3d01afaa57425926d9390b747a Mon Sep 17 00:00:00 2001 From: sdelcroix Date: Wed, 5 Nov 2008 07:59:27 +0000 Subject: [PATCH] 2008-11-05 Stephane Delcroix * src/TagSelectionWidget.cs: * src/Core/Tag.cs: fix for bgo 557793 git-svn-id: svn+ssh://svn.gnome.org/svn/f-spot/branches/FSPOT_0_5_0_STABLE@4572 772769d8-d925-0410-89eb-a6ffa0d40526 --- src/Core/Tag.cs | 3 +++ src/TagSelectionWidget.cs | 2 +- 3 files changed, 9 insertions(+), 1 deletions(-) diff --git a/src/Core/Tag.cs b/src/Core/Tag.cs index 42b671a..75b2d3d 100644 --- src/Core/Tag.cs +++ src/Core/Tag.cs @@ -108,6 +108,9 @@ namespace FSpot if (Math.Max (cached_icon.Width, cached_icon.Height) <= (int) tag_icon_size) return cached_icon; } + if (icon == null) + return null; + if (Math.Max (icon.Width, icon.Height) >= (int) tag_icon_size) { //Don't upscale if (cached_icon != null) cached_icon.Dispose (); diff --git a/src/TagSelectionWidget.cs b/src/TagSelectionWidget.cs index 515dc2a..3516c58 100644 --- src/TagSelectionWidget.cs +++ src/TagSelectionWidget.cs @@ -192,7 +192,7 @@ public class TagSelectionWidget : FSpot.Widgets.SaneTreeView { SetBackground (renderer, tag); // FIXME I can't set the Pixbuf to null, not sure if it's a GTK# bug... - if (tag.Icon != null) { + if (tag.SizedIcon != null) { if (FSpot.ColorManagement.IsEnabled) { //FIXME Gdk.Pixbuf temp = tag.SizedIcon.Copy(); -- 1.6.0.2