[Bf-blender-cvs] [52c0644] master: Fix for uiPanelFindByType comparing wrong member

Antony Riakiotakis noreply at git.blender.org
Wed Aug 27 04:35:36 CEST 2014


Commit: 52c06440d8e51c8661a679bcb33742666ce8dbf9
Author: Antony Riakiotakis
Date:   Wed Aug 27 11:57:05 2014 +1000
Branches: master
https://developer.blender.org/rB52c06440d8e51c8661a679bcb33742666ce8dbf9

Fix for uiPanelFindByType comparing wrong member

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

M	source/blender/editors/interface/interface_panel.c

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

diff --git a/source/blender/editors/interface/interface_panel.c b/source/blender/editors/interface/interface_panel.c
index 687789b..c957ba5 100644
--- a/source/blender/editors/interface/interface_panel.c
+++ b/source/blender/editors/interface/interface_panel.c
@@ -206,11 +206,11 @@ Panel *uiPanelFindByType(ARegion *ar, PanelType *pt)
 	Panel *pa;
 
 	const char *idname = pt->idname;
-	const char *tabname = pt->idname;
+	const char *tabname = pt->category;
 
 	for (pa = ar->panels.first; pa; pa = pa->next) {
 		if (STREQLEN(pa->panelname, idname, sizeof(pa->panelname))) {
-			if (STREQLEN(pa->tabname, tabname, sizeof(pa->panelname))) {
+			if (STREQLEN(pa->tabname, tabname, sizeof(pa->tabname))) {
 				return pa;
 			}
 		}




More information about the Bf-blender-cvs mailing list