Fix #114861: Add NLA region padding if markers are present. #115213

Merged
Nate Rupsis merged 4 commits from nrupsis/blender:114861-nla-markers-stuck into main 2023-11-22 21:01:27 +01:00
1 changed files with 9 additions and 1 deletions

View File

@ -430,9 +430,17 @@ static void nla_main_region_message_subscribe(const wmRegionMessageSubscribePara
}
}
static void nla_main_region_view2d_changed(const bContext * /*C*/, ARegion *region)
static void nla_main_region_view2d_changed(const bContext *C, ARegion *region)
{
SpaceNla *snla = CTX_wm_space_nla(C);
View2D *v2d = &region->v2d;
/* If markers are present add region padding
* so bottom strip isn't hidden.
*/
if (!BLI_listbase_is_empty(ED_context_get_markers(C))) {
v2d->tot.ymin -= (UI_MARKER_MARGIN_Y - NLACHANNEL_STEP(snla));
}
UI_view2d_curRect_clamp_y(v2d);
}