Fix T97500: NLA strip names drawn outside strip
Fix T97500 by removing the logic that for some unknown reason draws the entire string if the min/max were swapped. This function is only called in two places, once here in the NLA, and the VSE. The bug only materializes in the NLA though. Reviewed By: sybren Differential Revision: https://developer.blender.org/D14742
This commit is contained in:
@@ -2103,14 +2103,6 @@ void UI_view2d_text_cache_draw(ARegion *region)
|
|||||||
col_pack_prev = v2s->col.pack;
|
col_pack_prev = v2s->col.pack;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (v2s->rect.xmin >= v2s->rect.xmax) {
|
|
||||||
BLF_draw_default((float)(v2s->mval[0] + xofs),
|
|
||||||
(float)(v2s->mval[1] + yofs),
|
|
||||||
0.0,
|
|
||||||
v2s->str,
|
|
||||||
BLF_DRAW_STR_DUMMY_MAX);
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
BLF_enable(font_id, BLF_CLIPPING);
|
BLF_enable(font_id, BLF_CLIPPING);
|
||||||
BLF_clipping(
|
BLF_clipping(
|
||||||
font_id, v2s->rect.xmin - 4, v2s->rect.ymin - 4, v2s->rect.xmax + 4, v2s->rect.ymax + 4);
|
font_id, v2s->rect.xmin - 4, v2s->rect.ymin - 4, v2s->rect.xmax + 4, v2s->rect.ymax + 4);
|
||||||
@@ -2118,7 +2110,6 @@ void UI_view2d_text_cache_draw(ARegion *region)
|
|||||||
v2s->rect.xmin + xofs, v2s->rect.ymin + yofs, 0.0f, v2s->str, BLF_DRAW_STR_DUMMY_MAX);
|
v2s->rect.xmin + xofs, v2s->rect.ymin + yofs, 0.0f, v2s->str, BLF_DRAW_STR_DUMMY_MAX);
|
||||||
BLF_disable(font_id, BLF_CLIPPING);
|
BLF_disable(font_id, BLF_CLIPPING);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
g_v2d_strings = nullptr;
|
g_v2d_strings = nullptr;
|
||||||
|
|
||||||
if (g_v2d_strings_arena) {
|
if (g_v2d_strings_arena) {
|
||||||
|
|||||||
Reference in New Issue
Block a user