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-31 04:26:03 +0300
committerCampbell Barton <ideasman42@gmail.com>2017-07-31 04:26:03 +0300
commitac2b1663ef9616b61a2e9054330f3755cca34cff (patch)
tree689188a6562bc7e31f095f468e2cb37a3b7dc00c
parent18773f3f1502d35d2a4b88e5d7579ba015095a96 (diff)
Cleanup: remove next/prev from manipulator map
-rw-r--r--source/blender/blenkernel/intern/screen.c5
-rw-r--r--source/blender/windowmanager/manipulators/intern/wm_manipulator_intern.h1
-rw-r--r--source/blender/windowmanager/manipulators/intern/wm_manipulator_map.c13
3 files changed, 8 insertions, 11 deletions
diff --git a/source/blender/blenkernel/intern/screen.c b/source/blender/blenkernel/intern/screen.c
index f3a93a0a42c..237120b090d 100644
--- a/source/blender/blenkernel/intern/screen.c
+++ b/source/blender/blenkernel/intern/screen.c
@@ -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);
diff --git a/source/blender/windowmanager/manipulators/intern/wm_manipulator_intern.h b/source/blender/windowmanager/manipulators/intern/wm_manipulator_intern.h
index b8be482c3b8..b4603d5281c 100644
--- a/source/blender/windowmanager/manipulators/intern/wm_manipulator_intern.h
+++ b/source/blender/windowmanager/manipulators/intern/wm_manipulator_intern.h
@@ -91,7 +91,6 @@ typedef struct wmManipulatorMapSelectState {
} wmManipulatorMapSelectState;
struct wmManipulatorMap {
- struct wmManipulatorMap *next, *prev;
struct wmManipulatorMapType *type;
ListBase groups; /* wmManipulatorGroup */
diff --git a/source/blender/windowmanager/manipulators/intern/wm_manipulator_map.c b/source/blender/windowmanager/manipulators/intern/wm_manipulator_map.c
index 1a96846e75d..210243d5fff 100644
--- a/source/blender/windowmanager/manipulators/intern/wm_manipulator_map.c
+++ b/source/blender/windowmanager/manipulators/intern/wm_manipulator_map.c
@@ -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;