diff options
author | Joshua Leung <aligorith@gmail.com> | 2014-05-09 08:17:04 +0400 |
---|---|---|
committer | Joshua Leung <aligorith@gmail.com> | 2014-05-09 08:17:04 +0400 |
commit | b2b7b3f796fb850ff3dadaa3b751b1936eb47bf6 (patch) | |
tree | eca01926ad52d930b4dd0e592f4e9198e34d14aa /source/blender/editors/space_nla/nla_select.c | |
parent | ddc52b49ec38c50455d0db433bf987cecc629c56 (diff) |
NLA Editor Bugfix: Select NLA tracks too when selecting strips
Diffstat (limited to 'source/blender/editors/space_nla/nla_select.c')
-rw-r--r-- | source/blender/editors/space_nla/nla_select.c | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/source/blender/editors/space_nla/nla_select.c b/source/blender/editors/space_nla/nla_select.c index d4592135726..3e7a6f4578c 100644 --- a/source/blender/editors/space_nla/nla_select.c +++ b/source/blender/editors/space_nla/nla_select.c @@ -575,14 +575,6 @@ static void mouse_nla_strips(bContext *C, bAnimContext *ac, const int mval[2], s /* deselect all other channels first */ ANIM_deselect_anim_channels(ac, ac->data, ac->datatype, 0, ACHANNEL_SETFLAG_CLEAR); - - /* Highlight NLA-Track */ - if (ale->type == ANIMTYPE_NLATRACK) { - NlaTrack *nlt = (NlaTrack *)ale->data; - - nlt->flag |= NLATRACK_SELECTED; - ANIM_set_active_channel(ac, ac->data, ac->datatype, filter, nlt, ANIMTYPE_NLATRACK); - } } /* only select strip if we clicked on a valid channel and hit something */ @@ -594,10 +586,21 @@ static void mouse_nla_strips(bContext *C, bAnimContext *ac, const int mval[2], s /* if we selected it, we can make it active too * - we always need to clear the active strip flag though... + * - as well as selecting its track... */ deselect_nla_strips(ac, DESELECT_STRIPS_CLEARACTIVE, 0); - if (strip->flag & NLASTRIP_FLAG_SELECT) + + if (strip->flag & NLASTRIP_FLAG_SELECT) { strip->flag |= NLASTRIP_FLAG_ACTIVE; + + /* Highlight NLA-Track */ + if (ale->type == ANIMTYPE_NLATRACK) { + NlaTrack *nlt = (NlaTrack *)ale->data; + + nlt->flag |= NLATRACK_SELECTED; + ANIM_set_active_channel(ac, ac->data, ac->datatype, filter, nlt, ANIMTYPE_NLATRACK); + } + } } /* free this channel */ |