Fix #19453: rendering with mesh in edit mode would put the object
authorBrecht Van Lommel <brechtvanlommel@pandora.be>
Mon, 28 Sep 2009 14:40:37 +0000 (14:40 +0000)
committerBrecht Van Lommel <brechtvanlommel@pandora.be>
Mon, 28 Sep 2009 14:40:37 +0000 (14:40 +0000)
partially back in object mode, disabling e.g. X delete.

source/blender/editors/object/object_edit.c

index c734a7c606d6dd98d309b3695b08ce4b1d09a709..ee0b043a9a1a317aafa66e00da5219baac7ccd7b 100644 (file)
@@ -332,7 +332,7 @@ void ED_object_exit_editmode(bContext *C, int flag)
                if(freedata) free_editMball(obedit);
        }
 
-       /* freedata only 0 now on file saves */
+       /* freedata only 0 now on file saves and render */
        if(freedata) {
                ListBase pidlist;
                PTCacheID *pid;
@@ -357,10 +357,10 @@ void ED_object_exit_editmode(bContext *C, int flag)
                if(flag & EM_WAITCURSOR) waitcursor(0);
        
                WM_event_add_notifier(C, NC_SCENE|ND_MODE|NS_MODE_OBJECT, scene);
-       }
 
-       obedit->mode &= ~OB_MODE_EDIT;
-       ED_object_toggle_modes(C, obedit->restore_mode);
+               obedit->mode &= ~OB_MODE_EDIT;
+               ED_object_toggle_modes(C, obedit->restore_mode);
+       }
 }