[Bf-blender-cvs] [7d79196] wiggly-widgets: minor corrections to last commit

Campbell Barton noreply at git.blender.org
Sat Dec 6 15:37:53 CET 2014


Commit: 7d791966983f219317e97d3a288356c77d3ba4e7
Author: Campbell Barton
Date:   Sat Dec 6 15:37:46 2014 +0100
Branches: wiggly-widgets
https://developer.blender.org/rB7d791966983f219317e97d3a288356c77d3ba4e7

minor corrections to last commit

===================================================================

M	source/blender/windowmanager/intern/wm_widgets.c

===================================================================

diff --git a/source/blender/windowmanager/intern/wm_widgets.c b/source/blender/windowmanager/intern/wm_widgets.c
index 9c296ef..85da500 100644
--- a/source/blender/windowmanager/intern/wm_widgets.c
+++ b/source/blender/windowmanager/intern/wm_widgets.c
@@ -108,7 +108,7 @@ typedef struct wmWidgetGroupType {
 } wmWidgetGroupType;
 
 /**
- * This is a container for all widget types that can be instansiated in a area.
+ * This is a container for all widget types that can be instantiated in a region.
  * (similar to dropboxes).
  *
  * \note There is only ever one of these for every (area, region) combination.
@@ -436,12 +436,14 @@ wmWidgetMapType *WM_widgetmaptype_find(int spaceid, int regionid, bool is_3d)
 	wmWidgetMapType *wmaptype;
 	
 	for (wmaptype = widgetmaptypes.first; wmaptype; wmaptype = wmaptype->next) {
-		if (wmaptype->spaceid == spaceid && wmaptype->regionid == regionid && wmaptype->is_3d == is_3d) {
-			return wmaptype;
+		if (wmaptype->spaceid == spaceid && wmaptype->regionid == regionid) {
+			if (wmaptype->is_3d == is_3d) {
+				return wmaptype;
+			}
 		}
 	}
 	
-	wmaptype = MEM_callocN(sizeof(struct wmWidgetMapType), "widgettype list");
+	wmaptype = MEM_callocN(sizeof(wmWidgetMapType), "widgettype list");
 	wmaptype->spaceid = spaceid;
 	wmaptype->regionid = regionid;
 	wmaptype->is_3d = is_3d;




More information about the Bf-blender-cvs mailing list