diff options
author | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2019-06-04 15:47:29 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2019-06-04 19:26:02 +0300 |
commit | 5916b09670b861117b9c87778c0ddc8bcf0a2c35 (patch) | |
tree | eca980aa6540cef92ff5ebd9f7e6b3eda05cef58 /source/blender/editors/mask | |
parent | 5158896d7db6b9b9b9bb789073f835648d881a7f (diff) |
Fix T65032: selection conflicts between motion tracks and masks in clip editor
Diffstat (limited to 'source/blender/editors/mask')
-rw-r--r-- | source/blender/editors/mask/mask_select.c | 25 |
1 files changed, 17 insertions, 8 deletions
diff --git a/source/blender/editors/mask/mask_select.c b/source/blender/editors/mask/mask_select.c index 717ce9fd72e..2b3bd1b72c9 100644 --- a/source/blender/editors/mask/mask_select.c +++ b/source/blender/editors/mask/mask_select.c @@ -36,6 +36,7 @@ #include "WM_api.h" #include "WM_types.h" +#include "ED_clip.h" #include "ED_screen.h" #include "ED_select_utils.h" #include "ED_mask.h" /* own include */ @@ -211,6 +212,17 @@ void ED_mask_select_flush_all(Mask *mask) } } +void ED_mask_deselect_all(const bContext *C) +{ + Mask *mask = CTX_data_edit_mask(C); + if (mask) { + ED_mask_select_toggle_all(mask, SEL_DESELECT); + ED_mask_select_flush_all(mask); + DEG_id_tag_update(&mask->id, ID_RECALC_SELECT); + WM_event_add_notifier(C, NC_MASK | ND_SELECT, mask); + } +} + /** \} */ /* -------------------------------------------------------------------- */ @@ -375,14 +387,11 @@ static int select_exec(bContext *C, wmOperator *op) return OPERATOR_FINISHED; } else if (deselect_all) { - ED_mask_select_toggle_all(mask, SEL_DESELECT); - - ED_mask_select_flush_all(mask); - - DEG_id_tag_update(&mask->id, ID_RECALC_SELECT); - WM_event_add_notifier(C, NC_MASK | ND_SELECT, mask); - - return OPERATOR_FINISHED; + /* For clip editor tracks, leave deselect all to clip editor. */ + if (!ED_clip_can_select(C)) { + ED_mask_deselect_all(C); + return OPERATOR_FINISHED; + } } } |