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-21 18:25:45 +0300
committerCampbell Barton <ideasman42@gmail.com>2017-07-21 18:57:23 +0300
commit122706db9cd23c88775474750e99b57e74a3b9e5 (patch)
tree88e95e0965b7c05fa66542d645e8fab47a6f6334 /source/blender
parentac0da72a60aa5d57e69aa4187a2d71ba8cacaa82 (diff)
Fix manipulator handles getting added each refresh
The same manipulator map handler would accumulate, slowing down interactions.
Diffstat (limited to 'source/blender')
-rw-r--r--source/blender/editors/space_image/space_image.c3
-rw-r--r--source/blender/editors/space_node/space_node.c4
-rw-r--r--source/blender/editors/space_view3d/space_view3d.c4
3 files changed, 6 insertions, 5 deletions
diff --git a/source/blender/editors/space_image/space_image.c b/source/blender/editors/space_image/space_image.c
index 58fb75edd84..648c1b301e3 100644
--- a/source/blender/editors/space_image/space_image.c
+++ b/source/blender/editors/space_image/space_image.c
@@ -680,8 +680,9 @@ static void image_main_region_init(wmWindowManager *wm, ARegion *ar)
.regionid = RGN_TYPE_WINDOW,
};
ar->manipulator_map = WM_manipulatormap_new_from_type(&wmap_params);
+
+ WM_manipulatormap_add_handlers(ar, ar->manipulator_map);
}
- WM_manipulatormap_add_handlers(ar, ar->manipulator_map);
/* mask polls mode */
keymap = WM_keymap_find(wm->defaultconf, "Mask Editing", 0, 0);
diff --git a/source/blender/editors/space_node/space_node.c b/source/blender/editors/space_node/space_node.c
index c1099f38d92..c070495e565 100644
--- a/source/blender/editors/space_node/space_node.c
+++ b/source/blender/editors/space_node/space_node.c
@@ -649,9 +649,9 @@ static void node_main_region_init(wmWindowManager *wm, ARegion *ar)
if (ar->manipulator_map == NULL) {
ar->manipulator_map = WM_manipulatormap_new_from_type(
&(const struct wmManipulatorMapType_Params){SPACE_NODE, RGN_TYPE_WINDOW});
- }
- WM_manipulatormap_add_handlers(ar, ar->manipulator_map);
+ WM_manipulatormap_add_handlers(ar, ar->manipulator_map);
+ }
/* own keymaps */
keymap = WM_keymap_find(wm->defaultconf, "Node Generic", SPACE_NODE, 0);
diff --git a/source/blender/editors/space_view3d/space_view3d.c b/source/blender/editors/space_view3d/space_view3d.c
index 8bb3806a070..5dc802df871 100644
--- a/source/blender/editors/space_view3d/space_view3d.c
+++ b/source/blender/editors/space_view3d/space_view3d.c
@@ -494,9 +494,9 @@ static void view3d_main_region_init(wmWindowManager *wm, ARegion *ar)
if (ar->manipulator_map == NULL) {
ar->manipulator_map = WM_manipulatormap_new_from_type(
&(const struct wmManipulatorMapType_Params) {SPACE_VIEW3D, RGN_TYPE_WINDOW});
- }
- WM_manipulatormap_add_handlers(ar, ar->manipulator_map);
+ WM_manipulatormap_add_handlers(ar, ar->manipulator_map);
+ }
/* object ops. */