Undo revision 23130 which was a merge with 2.5, a messy one because I did something...
[blender.git] / source / blender / editors / space_outliner / outliner.c
index a3b47d5..762ad82 100644 (file)
@@ -1084,7 +1084,7 @@ static TreeElement *outliner_add_element(SpaceOops *soops, ListBase *lb, void *i
                                        te->flag |= TE_LAZY_CLOSED;
                        }
                        else if(ELEM3(proptype, PROP_BOOLEAN, PROP_INT, PROP_FLOAT)) {
-                               tot= RNA_property_array_length(ptr, prop);
+                               tot= RNA_property_array_length(prop);
 
                                if(!(tselem->flag & TSE_CLOSED)) {
                                        for(a=0; a<tot; a++)
@@ -1994,7 +1994,7 @@ static int tree_element_active_defgroup(bContext *C, Scene *scene, TreeElement *
        ob= (Object *)tselem->id;
        if(set) {
                ob->actdef= te->index+1;
-               DAG_id_flush_update(&ob->id, OB_RECALC_DATA);
+               DAG_object_flush_update(scene, ob, OB_RECALC_DATA);
                WM_event_add_notifier(C, NC_OBJECT|ND_TRANSFORM, ob);
        }
        else {
@@ -2120,8 +2120,10 @@ static int tree_element_active_psys(bContext *C, Scene *scene, TreeElement *te,
 {
        if(set) {
                Object *ob= (Object *)tselem->id;
+               ParticleSystem *psys= te->directdata;
                
-               WM_event_add_notifier(C, NC_OBJECT|ND_PARTICLE_DATA, ob);
+               PE_change_act_psys(scene, ob, psys);
+               WM_event_add_notifier(C, NC_OBJECT|ND_PARTICLE, ob);
                
 // XXX         extern_set_butspace(F7KEY, 0);
        }
@@ -3719,7 +3721,7 @@ static void tree_element_to_path(SpaceOops *soops, TreeElement *te, TreeStoreEle
                        /* item is part of an array, so must set the array_index */
                        *array_index= te->index;
                }
-               else if (RNA_property_array_length(ptr, prop)) {
+               else if (RNA_property_array_length(prop)) {
                        /* entire array was selected, so keyframe all */
                        *flag |= KSP_FLAG_WHOLE_ARRAY;
                }
@@ -4682,7 +4684,7 @@ static void restrictbutton_modifier_cb(bContext *C, void *poin, void *poin2)
        Scene *scene = (Scene *)poin;
        Object *ob = (Object *)poin2;
        
-       DAG_id_flush_update(&ob->id, OB_RECALC_DATA);
+       DAG_object_flush_update(scene, ob, OB_RECALC_DATA);
        object_handle_update(scene, ob);
 
        WM_event_add_notifier(C, NC_OBJECT|ND_TRANSFORM, ob);
@@ -5272,10 +5274,7 @@ void draw_outliner(const bContext *C)
                sizex_rna= MAX2(OL_RNA_COLX, sizex_rna+OL_RNA_COL_SPACEX);
                
                /* get width of data (for setting 'tot' rect, this is column 1 + column 2 + a bit extra) */
-               if (soops->outlinevis == SO_KEYMAP) 
-                       sizex= sizex_rna + OL_RNA_COL_SIZEX*3 + 50; // XXX this is only really a quick hack to make this wide enough...
-               else
-                       sizex= sizex_rna + OL_RNA_COL_SIZEX + 50;
+               sizex= sizex_rna + OL_RNA_COL_SIZEX + 50;
        }
        else {
                /* width must take into account restriction columns (if visible) so that entries will still be visible */
@@ -5288,9 +5287,6 @@ void draw_outliner(const bContext *C)
                        sizex += OL_TOGW*3;
        }
        
-       /* tweak to display last line (when list bigger than window) */
-       sizey += V2D_SCROLL_HEIGHT;
-       
        /* update size of tot-rect (extents of data/viewable area) */
        UI_view2d_totRect_set(v2d, sizex, sizey);