Cleanup: remove next/prev from manipulator map

This commit is contained in:
2017-07-31 11:26:03 +10:00
parent 18773f3f15
commit ac2b1663ef
3 changed files with 8 additions and 11 deletions

View File

@@ -353,7 +353,10 @@ void BKE_area_region_free(SpaceType *st, ARegion *ar)
}
}
region_free_manipulatormap_callback(ar->manipulator_map);
if (ar->manipulator_map != NULL) {
region_free_manipulatormap_callback(ar->manipulator_map);
}
BLI_freelistN(&ar->ui_lists);
BLI_freelistN(&ar->ui_previews);
BLI_freelistN(&ar->panels_category);

View File

@@ -91,7 +91,6 @@ typedef struct wmManipulatorMapSelectState {
} wmManipulatorMapSelectState;
struct wmManipulatorMap {
struct wmManipulatorMap *next, *prev;
struct wmManipulatorMapType *type;
ListBase groups; /* wmManipulatorGroup */

View File

@@ -179,9 +179,6 @@ wmManipulatorMap *WM_manipulatormap_new_from_type(
void wm_manipulatormap_remove(wmManipulatorMap *mmap)
{
if (!mmap)
return;
/* Clear first so further calls don't waste time trying to maintain correct array state. */
wm_manipulatormap_select_array_clear(mmap);
@@ -752,12 +749,10 @@ void wm_manipulatormap_handler_context(bContext *C, wmEventHandler *handler)
bool WM_manipulatormap_cursor_set(const wmManipulatorMap *mmap, wmWindow *win)
{
for (; mmap; mmap = mmap->next) {
wmManipulator *mpr = mmap->mmap_context.highlight;
if (mpr && mpr->type->cursor_get) {
WM_cursor_set(win, mpr->type->cursor_get(mpr));
return true;
}
wmManipulator *mpr = mmap->mmap_context.highlight;
if (mpr && mpr->type->cursor_get) {
WM_cursor_set(win, mpr->type->cursor_get(mpr));
return true;
}
return false;