Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGonzalo Odiard <godiard@gmail.com>2014-01-30 13:57:53 (GMT)
committer Gonzalo Odiard <godiard@gmail.com>2014-02-04 16:52:07 (GMT)
commitd3db6639e5420eff1fd7911afb8c78f20944f283 (patch)
treef4271155bc300cc2ef6760caa164cdf52f65b892
parent395f4d0783c46c993939f970f2a495ff705ade73 (diff)
Fix a corner case adding one image
This code is more complex than should be, need more work Signed-off-by: Gonzalo Odiard <gonzalo@laptop.org>
-rw-r--r--historietaactivity.py5
1 files changed, 1 insertions, 4 deletions
diff --git a/historietaactivity.py b/historietaactivity.py
index bca40da..86e221b 100644
--- a/historietaactivity.py
+++ b/historietaactivity.py
@@ -628,7 +628,7 @@ class ComicBox(Gtk.EventBox):
pixbuf = GdkPixbuf.Pixbuf.new_from_file(self.image_name)
img_scaled = False
- if self.img_w == -1 and pixbuf.get_width() > self.width:
+ if self.img_w == -1:
self.img_w = self.width
width_pxb = pixbuf.get_width()
@@ -636,9 +636,6 @@ class ComicBox(Gtk.EventBox):
scale = (self.width) / (1.0 * width_pxb)
self.img_h = int(scale * height_pxb)
img_scaled = True
- elif self.img_w == -1 and pixbuf.get_width() == self.width:
- self.img_w = self.width
- self.img_h = pixbuf.get_height()
self.pixbuf = pixbuf