Don't show try to make thumbnail if not a pixbuf yet
svn: r23459
This commit is contained in:
parent
8481984eac
commit
9670f8ff1c
@ -421,7 +421,7 @@ class SelectionWidget(Gtk.ScrolledWindow):
|
|||||||
"""
|
"""
|
||||||
w = region.x2 - region.x1
|
w = region.x2 - region.x1
|
||||||
h = region.y2 - region.y1
|
h = region.y2 - region.y1
|
||||||
if w >= 1 and h >= 1:
|
if w >= 1 and h >= 1 and self.pixbuf:
|
||||||
subpixbuf = self.pixbuf.new_subpixbuf(region.x1, region.y1, w, h)
|
subpixbuf = self.pixbuf.new_subpixbuf(region.x1, region.y1, w, h)
|
||||||
size = resize_keep_aspect(w, h, *thumbnail_size)
|
size = resize_keep_aspect(w, h, *thumbnail_size)
|
||||||
return subpixbuf.scale_simple(size[0], size[1],
|
return subpixbuf.scale_simple(size[0], size[1],
|
||||||
|
Loading…
Reference in New Issue
Block a user