blender-v3.3-release backports #115848
|
@ -1543,7 +1543,7 @@ void OptiXDevice::build_bvh(BVH *bvh, Progress &progress, bool refit)
|
|||
if (geom->geometry_type == Geometry::HAIR) {
|
||||
/* Build BLAS for curve primitives. */
|
||||
Hair *const hair = static_cast<Hair *const>(geom);
|
||||
if (hair->num_curves() == 0) {
|
||||
if (hair->num_segments() == 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -5902,6 +5902,10 @@ static int ui_do_but_SCROLL(
|
|||
const bool is_motion = (event->type == MOUSEMOVE);
|
||||
if (ui_numedit_but_SLI(
|
||||
but, data, (horizontal) ? mx : my, horizontal, is_motion, false, false)) {
|
||||
/* Scrollbars in popups need UI layout refresh to update the right items to show. */
|
||||
if (ui_block_is_popup_any(but->block)) {
|
||||
ED_region_tag_refresh_ui(data->region);
|
||||
}
|
||||
ui_numedit_apply(C, block, but, data);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1850,7 +1850,12 @@ static void scroller_activate_init(bContext *C,
|
|||
* - zooming must be allowed on this axis, otherwise, default to pan
|
||||
*/
|
||||
View2DScrollers scrollers;
|
||||
UI_view2d_scrollers_calc(v2d, nullptr, &scrollers);
|
||||
/* Some Editors like the Filebrowser or Spreadsheet already set up custom masks for scrollbars
|
||||
* (they dont cover the whole region width or height), these need to be considered, otherwise
|
||||
* coords for `mouse_in_scroller_handle` later are not compatible. */
|
||||
rcti scroller_mask = v2d->hor;
|
||||
BLI_rcti_union(&scroller_mask, &v2d->vert);
|
||||
UI_view2d_scrollers_calc(v2d, &scroller_mask, &scrollers);
|
||||
|
||||
/* Use a union of 'cur' & 'tot' in case the current view is far outside 'tot'. In this cases
|
||||
* moving the scroll bars has far too little effect and the view can get stuck T31476. */
|
||||
|
|
Loading…
Reference in New Issue