Update of /cvsroot/ufraw/ufraw
In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv27214

Modified Files:
        ufraw_preview.c 
Log Message:
Fix bug #363: UFRaw crashes with zoom >100%. Patch by Frank Markesteijn.

Index: ufraw_preview.c
===================================================================
RCS file: /cvsroot/ufraw/ufraw/ufraw_preview.c,v
retrieving revision 1.380
retrieving revision 1.381
diff -u -d -r1.380 -r1.381
--- ufraw_preview.c     2 Sep 2014 04:30:48 -0000       1.380
+++ ufraw_preview.c     2 Sep 2014 04:45:30 -0000       1.381
@@ -698,10 +698,11 @@
         GdkRectangle viewRect;
         gtk_image_view_get_viewport(GTK_IMAGE_VIEW(data->PreviewWidget),
                                     &viewRect);
+        gdouble zoom = 
gtk_image_view_get_zoom(GTK_IMAGE_VIEW(data->PreviewWidget));
 
-        int x1 = MAX(Crop.x, viewRect.x);
+        int x1 = MAX(Crop.x, viewRect.x / zoom);
         int width = MIN(Crop.width, viewRect.width);
-        int y1 = MAX(Crop.y, viewRect.y);
+        int y1 = MAX(Crop.y, viewRect.y / zoom);
         int height = MIN(Crop.height, viewRect.height);
 
         data->OverUnderTicker++;


------------------------------------------------------------------------------
Slashdot TV.  
Video for Nerds.  Stuff that matters.
http://tv.slashdot.org/
_______________________________________________
ufraw-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ufraw-cvs

Reply via email to