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:
parent
f45a735aad
commit
8d53ead69b
Notes:
blender-bot
2023-09-08 04:55:43 +02:00
Referenced by issue #97500, NLA strip names can be fully rendered when they shouldn't be
|
@ -2103,21 +2103,12 @@ void UI_view2d_text_cache_draw(ARegion *region)
|
|||
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_clipping(
|
||||
font_id, v2s->rect.xmin - 4, v2s->rect.ymin - 4, v2s->rect.xmax + 4, v2s->rect.ymax + 4);
|
||||
BLF_draw_default(
|
||||
v2s->rect.xmin + xofs, v2s->rect.ymin + yofs, 0.0f, v2s->str, BLF_DRAW_STR_DUMMY_MAX);
|
||||
BLF_disable(font_id, BLF_CLIPPING);
|
||||
}
|
||||
BLF_enable(font_id, BLF_CLIPPING);
|
||||
BLF_clipping(
|
||||
font_id, v2s->rect.xmin - 4, v2s->rect.ymin - 4, v2s->rect.xmax + 4, v2s->rect.ymax + 4);
|
||||
BLF_draw_default(
|
||||
v2s->rect.xmin + xofs, v2s->rect.ymin + yofs, 0.0f, v2s->str, BLF_DRAW_STR_DUMMY_MAX);
|
||||
BLF_disable(font_id, BLF_CLIPPING);
|
||||
}
|
||||
g_v2d_strings = nullptr;
|
||||
|
||||
|
|
Loading…
Reference in New Issue