[f-spot] return early if the request for PaintRectangle was meant to redraw the background only



commit bed6efa44338c513d3809f49ed2c584ce772a28e
Author: Stephane Delcroix <stephane delcroix org>
Date:   Thu Jul 9 11:11:27 2009 +0200

    return early if the request for PaintRectangle was meant to redraw the background only

 src/Widgets/ImageView.cs |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/src/Widgets/ImageView.cs b/src/Widgets/ImageView.cs
index 126227b..02fb92d 100644
--- a/src/Widgets/ImageView.cs
+++ b/src/Widgets/ImageView.cs
@@ -723,6 +723,9 @@ namespace FSpot.Widgets
 
 			area.Intersect (new Rectangle (x_offset, y_offset, (int)scaled_width, (int)scaled_height));
 
+			if (area.Width <= 0  || area.Height <= 0)
+				return;
+
 			//Short circuit for 1:1 zoom
 			if (zoom == 1.0 &&
 			    !Pixbuf.HasAlpha &&



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]