diff options
author | Campbell Barton <ideasman42@gmail.com> | 2017-07-23 20:28:57 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2017-07-24 10:19:36 +0300 |
commit | c7bc2f5e870c8074ed639a3b33c52df19679ca41 (patch) | |
tree | 6d36ad59f827f691e74129f336d1ef79a11c18d4 /source/blender/windowmanager/manipulators/intern/wm_manipulator_group.c | |
parent | 392b6a303ec21fe6edef6386280d0d6fb94e7f90 (diff) |
Manipulator: handle keymaps for selected items
Was only handling keymap items when the cursor
was hovering over a manipulator.
Diffstat (limited to 'source/blender/windowmanager/manipulators/intern/wm_manipulator_group.c')
-rw-r--r-- | source/blender/windowmanager/manipulators/intern/wm_manipulator_group.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/source/blender/windowmanager/manipulators/intern/wm_manipulator_group.c b/source/blender/windowmanager/manipulators/intern/wm_manipulator_group.c index 126c866d600..c61392b500c 100644 --- a/source/blender/windowmanager/manipulators/intern/wm_manipulator_group.c +++ b/source/blender/windowmanager/manipulators/intern/wm_manipulator_group.c @@ -202,6 +202,20 @@ bool wm_manipulatorgroup_is_visible_in_drawstep(const wmManipulatorGroup *mgroup } } +bool wm_manipulatorgroup_is_any_selected(const wmManipulatorGroup *mgroup) +{ + if (mgroup->type->flag & WM_MANIPULATORGROUPTYPE_SELECT) { + for (const wmManipulator *mpr = mgroup->manipulators.first; mpr; mpr = mpr->next) { + if (mpr->state & WM_MANIPULATOR_STATE_SELECT) { + return true; + } + } + } + return false; +} + +/** \} */ + /** \name Manipulator operators * * Basic operators for manipulator interaction with user configurable keymaps. |