[Bf-blender-cvs] [22c3d2e] master: "Fix" assert in new UI align code.

Bastien Montagne noreply at git.blender.org
Tue Nov 10 09:27:52 CET 2015


Commit: 22c3d2efebddad17141eefa29ee0d7ac69f28b50
Author: Bastien Montagne
Date:   Tue Nov 10 09:23:11 2015 +0100
Branches: master
https://developer.blender.org/rB22c3d2efebddad17141eefa29ee0d7ac69f28b50

"Fix" assert in new UI align code.

Looks like UI code can produce widgets with same left/top positions (in very narrow space case).
Not nice, but we do not really care, UI becomes unusable way before we reach that point anyway.

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

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

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

diff --git a/source/blender/editors/interface/interface_align.c b/source/blender/editors/interface/interface_align.c
index d0be6d1..e1e4f22 100644
--- a/source/blender/editors/interface/interface_align.c
+++ b/source/blender/editors/interface/interface_align.c
@@ -296,7 +296,10 @@ static int ui_block_align_butal_cmp(const void *a, const void *b)
 		return (*butal->borders[LEFT] > *butal_other->borders[LEFT]) ? 1 : -1;
 	}
 
-	BLI_assert(0);
+	/* XXX We cannot actually assert here, since in some very compressed space cases, stupid UI code produces
+	 *     widgets which have the same TOP and LEFT positions...
+	 *     We do not care really, because this happens when UI is way too small to be usable anyway. */
+	/* BLI_assert(0); */
 	return 0;
 }




More information about the Bf-blender-cvs mailing list