[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [48781] branches/soc-2012-bratwurst/source /blender/editors/object/object_vgroup.c: Deleting the selected item in the vertex groups listbox leaves the selection on the next rather than the preceding item .

Jorge Rodriguez bs.vino at gmail.com
Tue Jul 10 01:46:50 CEST 2012


Revision: 48781
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=48781
Author:   vino
Date:     2012-07-09 23:46:48 +0000 (Mon, 09 Jul 2012)
Log Message:
-----------
Deleting the selected item in the vertex groups listbox leaves the selection on the next rather than the preceding item.

Modified Paths:
--------------
    branches/soc-2012-bratwurst/source/blender/editors/object/object_vgroup.c

Modified: branches/soc-2012-bratwurst/source/blender/editors/object/object_vgroup.c
===================================================================
--- branches/soc-2012-bratwurst/source/blender/editors/object/object_vgroup.c	2012-07-09 23:28:49 UTC (rev 48780)
+++ branches/soc-2012-bratwurst/source/blender/editors/object/object_vgroup.c	2012-07-09 23:46:48 UTC (rev 48781)
@@ -1950,8 +1950,16 @@
 	if (index < 0)
 		dg = BLI_findlink(&ob->defbase, ob->actdef - 1);
 	else
+	{
+		unsigned short new_selection = ob->actdef;
+		if (ob->actdef == index + 1)
+			new_selection = index + 2;
+
 		dg = BLI_findlink(&ob->defbase, index);
 
+		ob->actdef = new_selection;
+	}
+
 	if (!dg)
 		return;
 




More information about the Bf-blender-cvs mailing list