fix for own commit r49991, this exposed bad logic in rect copy function.
[blender.git] / source / blender / editors / interface / interface.c
index 7185946f4fedbefd510d599e4c1ab40685ee0044..e7eb1e3a6980431155bb32fede6f9677bf9de65c 100644 (file)
@@ -137,10 +137,7 @@ void ui_block_to_window_rct(const ARegion *ar, uiBlock *block, rctf *graph, rcti
        ui_block_to_window_fl(ar, block, &tmpr.xmin, &tmpr.ymin);
        ui_block_to_window_fl(ar, block, &tmpr.xmax, &tmpr.ymax);
 
-       winr->xmin = tmpr.xmin;
-       winr->ymin = tmpr.ymin;
-       winr->xmax = tmpr.xmax;
-       winr->ymax = tmpr.ymax;
+       BLI_rcti_rctf_copy(winr, &tmpr);
 }
 
 void ui_window_to_block_fl(const ARegion *ar, uiBlock *block, float *x, float *y)   /* for mouse cursor */