Fix manipulator handles getting added each refresh

The same manipulator map handler would accumulate,
slowing down interactions.
This commit is contained in:
Campbell Barton 2017-07-22 01:25:45 +10:00
parent ac0da72a60
commit 122706db9c
Notes: blender-bot 2023-02-14 06:27:47 +01:00
Referenced by commit 49c0ad1188, Revert "Fix manipulator handles getting added each refresh"
3 changed files with 6 additions and 5 deletions

View File

@ -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);

View File

@ -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);

View File

@ -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. */