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:
authorCampbell Barton <ideasman42@gmail.com>2017-07-23 20:28:57 +0300
committerCampbell Barton <ideasman42@gmail.com>2017-07-24 10:19:36 +0300
commitc7bc2f5e870c8074ed639a3b33c52df19679ca41 (patch)
tree6d36ad59f827f691e74129f336d1ef79a11c18d4 /source/blender/windowmanager/manipulators/intern/wm_manipulator_group.c
parent392b6a303ec21fe6edef6386280d0d6fb94e7f90 (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.c14
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.