Revision: 24699
          
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=24699
Author:   aligorith
Date:     2009-11-20 11:21:31 +0100 (Fri, 20 Nov 2009)

Log Message:
-----------
Bugfix #19923: UVImage editor gets stuck in move/zoom mode

Modified Paths:
--------------
    trunk/blender/source/blender/editors/interface/view2d_ops.c
    trunk/blender/source/blender/editors/space_image/image_ops.c

Modified: trunk/blender/source/blender/editors/interface/view2d_ops.c
===================================================================
--- trunk/blender/source/blender/editors/interface/view2d_ops.c 2009-11-20 
10:00:54 UTC (rev 24698)
+++ trunk/blender/source/blender/editors/interface/view2d_ops.c 2009-11-20 
10:21:31 UTC (rev 24699)
@@ -237,6 +237,7 @@
                        
                case LEFTMOUSE:
                case MIDDLEMOUSE:
+               case ESCKEY:
                        if (event->val==KM_RELEASE) {
                                /* calculate overall delta mouse-movement for 
redo */
                                RNA_int_set(op->ptr, "deltax", (vpd->startx - 
vpd->lastx));
@@ -253,6 +254,12 @@
        return OPERATOR_RUNNING_MODAL;
 }
 
+static int view_pan_cancel(bContext *C, wmOperator *op)
+{
+       view_pan_exit(C, op);
+       return OPERATOR_CANCELLED;
+}
+
 void VIEW2D_OT_pan(wmOperatorType *ot)
 {
        /* identifiers */
@@ -264,6 +271,7 @@
        ot->exec= view_pan_exec;
        ot->invoke= view_pan_invoke;
        ot->modal= view_pan_modal;
+       ot->cancel= view_pan_cancel;
        
        /* operator is repeatable */
        ot->flag= OPTYPE_BLOCKING;

Modified: trunk/blender/source/blender/editors/space_image/image_ops.c
===================================================================
--- trunk/blender/source/blender/editors/space_image/image_ops.c        
2009-11-20 10:00:54 UTC (rev 24698)
+++ trunk/blender/source/blender/editors/space_image/image_ops.c        
2009-11-20 10:21:31 UTC (rev 24699)
@@ -234,6 +234,7 @@
                        view_pan_exec(C, op);
                        break;
                case MIDDLEMOUSE:
+               case LEFTMOUSE:
                        if(event->val==KM_RELEASE) {
                                view_pan_exit(C, op, 0);
                                return OPERATOR_FINISHED;
@@ -349,6 +350,7 @@
                        ED_area_tag_redraw(CTX_wm_area(C));
                        break;
                case MIDDLEMOUSE:
+               case LEFTMOUSE:
                        if(event->val==KM_RELEASE) {
                                view_zoom_exit(C, op, 0);
                                return OPERATOR_FINISHED;


_______________________________________________
Bf-blender-cvs mailing list
Bf-blender-cvs@blender.org
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to