diff options
Diffstat (limited to 'source/blender/editors/space_nla/nla_channels.c')
-rw-r--r-- | source/blender/editors/space_nla/nla_channels.c | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/source/blender/editors/space_nla/nla_channels.c b/source/blender/editors/space_nla/nla_channels.c index 4115d6b49ba..3e4eb6af098 100644 --- a/source/blender/editors/space_nla/nla_channels.c +++ b/source/blender/editors/space_nla/nla_channels.c @@ -384,19 +384,12 @@ static int nlachannels_mouseclick_invoke(bContext *C, wmOperator *op, const wmEv selectmode = SELECT_REPLACE; } - /** - * Figure out which channel user clicked in: - * - * \note Although channels technically start at y= NLACHANNEL_FIRST, - * we need to adjust by half a channel's height so that the tops of channels get caught ok. - * Since NLACHANNEL_FIRST is really NLACHANNEL_HEIGHT, we simply use NLACHANNEL_HEIGHT_HALF. - */ + /* Figure out which channel user clicked in. */ UI_view2d_region_to_view(v2d, event->mval[0], event->mval[1], &x, &y); - UI_view2d_listview_view_to_cell(v2d, - NLACHANNEL_NAMEWIDTH, + UI_view2d_listview_view_to_cell(NLACHANNEL_NAMEWIDTH, NLACHANNEL_STEP(snla), 0, - (float)NLACHANNEL_HEIGHT_HALF(snla), + NLACHANNEL_FIRST_TOP(snla), x, y, NULL, |