code cleanup: use BLI rect functions for interface button and block code.

This commit is contained in:
2012-08-18 18:11:51 +00:00
parent 63f143a3cc
commit a5b5f5d3fb
5 changed files with 259 additions and 302 deletions

View File

@@ -729,10 +729,7 @@ static int ui_editsource_uibut_match(uiBut *but_a, uiBut *but_b)
/* this just needs to be a 'good-enough' comparison so we can know beyond
* reasonable doubt that these buttons are the same between redraws.
* if this fails it only means edit-source fails - campbell */
if ((but_a->rect.xmin == but_b->rect.xmin) &&
(but_a->rect.xmax == but_b->rect.xmax) &&
(but_a->rect.ymin == but_b->rect.ymin) &&
(but_a->rect.ymax == but_b->rect.ymax) &&
if (BLI_rctf_compare(&but_a->rect, &but_b->rect, FLT_EPSILON) &&
(but_a->type == but_b->type) &&
(but_a->rnaprop == but_b->rnaprop) &&
(but_a->optype == but_b->optype) &&