[Bf-blender-cvs] [3d707e9] temp_manipulators_core: Fix some stupid mistakes in previous commit

Julian Eisel noreply at git.blender.org
Mon Oct 3 19:27:33 CEST 2016


Commit: 3d707e94cd6e0fae48eaea922ee2f30f47e060f4
Author: Julian Eisel
Date:   Mon Oct 3 19:23:26 2016 +0200
Branches: temp_manipulators_core
https://developer.blender.org/rB3d707e94cd6e0fae48eaea922ee2f30f47e060f4

Fix some stupid mistakes in previous commit

===================================================================

M	source/blender/windowmanager/manipulators/intern/wm_manipulatormap.c

===================================================================

diff --git a/source/blender/windowmanager/manipulators/intern/wm_manipulatormap.c b/source/blender/windowmanager/manipulators/intern/wm_manipulatormap.c
index 4be9cba..579d6b2 100644
--- a/source/blender/windowmanager/manipulators/intern/wm_manipulatormap.c
+++ b/source/blender/windowmanager/manipulators/intern/wm_manipulatormap.c
@@ -240,14 +240,6 @@ static void manipulatormap_prepare_drawing(
 	manipulatormap_tag_updated(mmap);
 }
 
-static void manipulator_draw(wmManipulator *manipulator, const bContext *C, ListBase *draw_manipulators)
-{
-	BLI_assert(BLI_findindex(draw_manipulators, manipulator) != -1);
-	manipulator->draw(C, manipulator);
-	/* free/remove manipulator link after drawing */
-	BLI_freelinkN(draw_manipulators, manipulator);
-}
-
 /**
  * Draw all visible manipulators in \a mmap.
  * Uses global draw_manipulators listbase.
@@ -282,17 +274,16 @@ static void manipulators_draw_list(const wmManipulatorMap *mmap, const bContext
 		glPopMatrix();
 	}
 
-
 	/* draw_manipulators contains all visible manipulators - draw them */
 	for (LinkData *link = draw_manipulators->first, *link_next; link; link = link_next) {
 		wmManipulator *manipulator = link->data;
 		link_next = link->next;
 
-		/* removes/frees manipulator link from draw_manipulators */
-		manipulator_draw(manipulator, C, draw_manipulators);
+		manipulator->draw(C, manipulator);
+		/* free/remove manipulator link after drawing */
+		BLI_freelinkN(draw_manipulators, link);
 	}
 
-
 	if (draw_multisample) {
 		glDisable(GL_MULTISAMPLE);
 	}
@@ -303,7 +294,7 @@ static void manipulators_draw_list(const wmManipulatorMap *mmap, const bContext
 
 void WM_manipulatormap_draw(wmManipulatorMap *mmap, const bContext *C, const int drawstep)
 {
-	static ListBase draw_manipulators = {NULL};
+	ListBase draw_manipulators = {NULL};
 
 	manipulatormap_prepare_drawing(mmap, C, &draw_manipulators, drawstep);
 	manipulators_draw_list(mmap, C, &draw_manipulators);




More information about the Bf-blender-cvs mailing list