[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [58654] trunk/blender/source/blender/ editors/interface/interface.c: internal api: args passed to ui_but_equals_old() were wrong order.
Campbell Barton
ideasman42 at gmail.com
Sat Jul 27 10:06:46 CEST 2013
Revision: 58654
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=58654
Author: campbellbarton
Date: 2013-07-27 08:06:46 +0000 (Sat, 27 Jul 2013)
Log Message:
-----------
internal api: args passed to ui_but_equals_old() were wrong order.
Modified Paths:
--------------
trunk/blender/source/blender/editors/interface/interface.c
Modified: trunk/blender/source/blender/editors/interface/interface.c
===================================================================
--- trunk/blender/source/blender/editors/interface/interface.c 2013-07-27 08:04:46 UTC (rev 58653)
+++ trunk/blender/source/blender/editors/interface/interface.c 2013-07-27 08:06:46 UTC (rev 58654)
@@ -559,19 +559,19 @@
/* ************** BLOCK ENDING FUNCTION ************* */
/* NOTE: if but->poin is allocated memory for every defbut, things fail... */
-static bool ui_but_equals_old(uiBut *but, uiBut *oldbut)
+static bool ui_but_equals_old(const uiBut *but, const uiBut *oldbut)
{
/* various properties are being compared here, hopefully sufficient
* to catch all cases, but it is simple to add more checks later */
if (but->retval != oldbut->retval) return false;
if (but->rnapoin.data != oldbut->rnapoin.data) return false;
- if (but->rnaprop != oldbut->rnaprop)
- if (but->rnaindex != oldbut->rnaindex) return false;
+ if (but->rnaprop != oldbut->rnaprop && but->rnaindex != oldbut->rnaindex) return false;
if (but->func != oldbut->func) return false;
if (but->funcN != oldbut->funcN) return false;
if (oldbut->func_arg1 != oldbut && but->func_arg1 != oldbut->func_arg1) return false;
if (oldbut->func_arg2 != oldbut && but->func_arg2 != oldbut->func_arg2) return false;
- if (!but->funcN && ((but->poin != oldbut->poin && (uiBut *)oldbut->poin != oldbut) || but->pointype != oldbut->pointype)) return false;
+ if (!but->funcN && ((but->poin != oldbut->poin && (uiBut *)oldbut->poin != oldbut) ||
+ (but->pointype != oldbut->pointype))) return false;
if (but->optype != oldbut->optype) return false;
return true;
@@ -620,7 +620,7 @@
return found;
for (oldbut = oldblock->buttons.first; oldbut; oldbut = oldbut->next) {
- if (ui_but_equals_old(oldbut, but)) {
+ if (ui_but_equals_old(but, oldbut)) {
if (oldbut->active) {
#if 0
// but->flag = oldbut->flag;
More information about the Bf-blender-cvs
mailing list