Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/editors/space_nla/nla_channels.c')
-rw-r--r--source/blender/editors/space_nla/nla_channels.c38
1 files changed, 24 insertions, 14 deletions
diff --git a/source/blender/editors/space_nla/nla_channels.c b/source/blender/editors/space_nla/nla_channels.c
index ca50ff3b545..bf914a05620 100644
--- a/source/blender/editors/space_nla/nla_channels.c
+++ b/source/blender/editors/space_nla/nla_channels.c
@@ -287,24 +287,34 @@ static int mouse_nla_channels(bAnimContext *ac, float x, int channel_index, shor
/* NOTE: rest of NLA-Action name doubles for operating on the AnimData block
* - this is useful when there's no clear divider, and makes more sense in
* the case of users trying to use this to change actions
+ * - in tweakmode, clicking here gets us out of tweakmode, as changing selection
+ * while in tweakmode is really evil!
*/
-
- /* select/deselect */
- if (selectmode == SELECT_INVERT) {
- /* inverse selection status of this AnimData block only */
- adt->flag ^= ADT_UI_SELECTED;
+ if (nlaedit_is_tweakmode_on(ac)) {
+ /* exit tweakmode immediately */
+ nlaedit_disable_tweakmode(ac);
+
+ /* changes to NLA-Action occurred */
+ notifierFlags |= ND_NLA_ACTCHANGE;
}
else {
- /* select AnimData block by itself */
- ANIM_deselect_anim_channels(ac, ac->data, ac->datatype, 0, ACHANNEL_SETFLAG_CLEAR);
- adt->flag |= ADT_UI_SELECTED;
+ /* select/deselect */
+ if (selectmode == SELECT_INVERT) {
+ /* inverse selection status of this AnimData block only */
+ adt->flag ^= ADT_UI_SELECTED;
+ }
+ else {
+ /* select AnimData block by itself */
+ ANIM_deselect_anim_channels(ac, ac->data, ac->datatype, 0, ACHANNEL_SETFLAG_CLEAR);
+ adt->flag |= ADT_UI_SELECTED;
+ }
+
+ /* set active? */
+ if (adt->flag & ADT_UI_SELECTED)
+ adt->flag |= ADT_UI_ACTIVE;
+
+ notifierFlags |= (ND_ANIMCHAN | NA_SELECTED);
}
-
- /* set active? */
- if (adt->flag & ADT_UI_SELECTED)
- adt->flag |= ADT_UI_ACTIVE;
-
- notifierFlags |= (ND_ANIMCHAN | NA_SELECTED);
}
}
break;