Update of /cvsroot/ufraw/ufraw
In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv11224

Modified Files:
        ufraw_preview.c 
Log Message:
Fix rendering of crop area.


Index: ufraw_preview.c
===================================================================
RCS file: /cvsroot/ufraw/ufraw/ufraw_preview.c,v
retrieving revision 1.311
retrieving revision 1.312
diff -u -d -r1.311 -r1.312
--- ufraw_preview.c     25 Nov 2009 16:15:45 -0000      1.311
+++ ufraw_preview.c     26 Nov 2009 01:07:26 -0000      1.312
@@ -1860,6 +1860,8 @@
            (CFG->CropY2-CFG->CropY1)/3);
 
     if ( (event->state&GDK_BUTTON1_MASK)==0 ) {
+       // While mouse button is not clicked we set the cursor type
+       // according to mouse pointer location.
        const CursorType tr_cursor[16] = {
            crop_cursor, crop_cursor, crop_cursor, crop_cursor,
            crop_cursor, top_left_cursor, left_cursor, bottom_left_cursor,
@@ -1884,7 +1886,6 @@
            else if (x <= CFG->CropX2)
                sel_cursor |= 12;
        }
-
        data->CropMotionType = tr_cursor[sel_cursor];
 
        GtkWidget *event_box =
@@ -1892,6 +1893,8 @@
        gdk_window_set_cursor(event_box->window,
                data->Cursor[data->CropMotionType]);
     } else {
+       // While mouse button is clicked we change crop according to cursor
+       // type and mouse pointer location.
        if ( data->CropMotionType==top_cursor ||
             data->CropMotionType==top_left_cursor ||
             data->CropMotionType==top_right_cursor )
@@ -2339,9 +2342,11 @@
     if (CFG->CropY2 > data->UF->rotatedHeight)
        CFG->CropY2 = data->UF->rotatedHeight;
 
-    if (!CFG->LockAspect)
+    if (!CFG->LockAspect) {
+       update_crop_ranges(data, render);
+       refresh_aspect(data);
        return;
-
+    }
     if (data->AspectRatio == 0)
        aspect = ((double)data->UF->rotatedWidth) / data->UF->rotatedHeight;
     else
@@ -2446,12 +2451,14 @@
            }
            break;
 
+       case move_cursor:
+           break;
+
        default:
+           g_warning("fix_crop_aspect(): unknown cursor %d", cursor);
            return;
     }
     update_crop_ranges(data, render);
-    if (!CFG->LockAspect)
-       refresh_aspect(data);
 }
 
 /* Modify current crop area so that it fits current aspect ratio */


------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
ufraw-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ufraw-cvs

Reply via email to