[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [42744] trunk/blender/source/blender/ editors/screen/screen_ops.c: Patch #27085, Restore old 2. 49 TAB behaviour for window splitting, by Andre Oliveira

Michael Fox mfoxdogg at gmail.com
Tue Dec 20 01:46:55 CET 2011


Revision: 42744
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=42744
Author:   mfoxdogg
Date:     2011-12-20 00:46:55 +0000 (Tue, 20 Dec 2011)
Log Message:
-----------
Patch #27085, Restore old 2.49 TAB behaviour for window splitting, by Andre Oliveira

Now this patch only applies to RMB window splitting not the click and drag as that would cause confusion and big mess

Modified Paths:
--------------
    trunk/blender/source/blender/editors/screen/screen_ops.c

Modified: trunk/blender/source/blender/editors/screen/screen_ops.c
===================================================================
--- trunk/blender/source/blender/editors/screen/screen_ops.c	2011-12-20 00:42:05 UTC (rev 42743)
+++ trunk/blender/source/blender/editors/screen/screen_ops.c	2011-12-20 00:46:55 UTC (rev 42744)
@@ -1293,6 +1293,7 @@
 		op->customdata = NULL;
 	}
 	
+	WM_cursor_restore(CTX_wm_window(C));
 	WM_event_add_notifier(C, NC_SCREEN|NA_EDITED, NULL);
 	
 	/* this makes sure aligned edges will result in aligned grabbing */
@@ -1491,6 +1492,37 @@
 				}
 			}
 			break;
+			
+		case MIDDLEMOUSE:
+		case TABKEY:
+			if (sd->previewmode==0){
+			}
+			else{
+				dir = RNA_enum_get(op->ptr, "direction");
+				
+				if(event->val==KM_PRESS){
+					if (sd->sarea){
+						sd->sarea->flag &= ~(AREA_FLAG_DRAWSPLIT_H|AREA_FLAG_DRAWSPLIT_V);
+						ED_area_tag_redraw(sd->sarea);
+						
+						if (dir=='v'){
+							RNA_enum_set(op->ptr, "direction", 'h');
+							sd->sarea->flag |= AREA_FLAG_DRAWSPLIT_H;
+							
+							WM_cursor_set(CTX_wm_window(C),CURSOR_X_MOVE);
+						}
+						else{
+							RNA_enum_set(op->ptr, "direction", 'v');
+							sd->sarea->flag |= AREA_FLAG_DRAWSPLIT_V;
+							
+							WM_cursor_set(CTX_wm_window(C),CURSOR_Y_MOVE);
+						}
+					}
+				}
+			}
+			
+			break;
+			
 		case RIGHTMOUSE: /* cancel operation */
 		case ESCKEY:
 			return area_split_cancel(C, op);




More information about the Bf-blender-cvs mailing list