Merging r50049 through r50076 from trunk into soc-2011-tomato
[blender.git] / source / blender / editors / space_image / image_buttons.c
index d858e05132d52ef1b09101c72d6a19d8efabe55b..9c9e94d4ce499caede35c4cdb9996cd515a3c304 100644 (file)
@@ -274,7 +274,7 @@ static void preview_cb(ScrArea *sa, struct uiBlock *block)
        
        /* while dragging we need to update the rects, otherwise it doesn't end with correct one */
 
-       BLI_rctf_init(&dispf, 15.0f, (block->rect.xmax - block->rect.xmin) - 15.0f, 15.0f, (block->rect.ymax - block->rect.ymin) - 15.0f);
+       BLI_rctf_init(&dispf, 15.0f, BLI_RCT_SIZE_X(&block->rect) - 15.0f, 15.0f, (BLI_RCT_SIZE_Y(&block->rect)) - 15.0f);
        ui_graphics_to_window_rct(sa->win, &dispf, disprect);
        
        /* correction for gla draw */