Undo revision 23130 which was a merge with 2.5, a messy one because I did something...
[blender.git] / source / blender / editors / curve / editfont.c
index ae34f30..46be950 100644 (file)
@@ -273,14 +273,15 @@ static void text_update_edited(bContext *C, Scene *scene, Object *obedit, int re
        BKE_text_to_curve(scene, obedit, mode);
 
        if(recalc)
-               DAG_id_flush_update(obedit->data, OB_RECALC_DATA);
-       WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data);
+               DAG_object_flush_update(scene, obedit, OB_RECALC_DATA);
+       WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_DATA, obedit);
 }
 
 /********************** insert lorem operator *********************/
 
 static int insert_lorem_exec(bContext *C, wmOperator *op)
 {
+       Scene *scene= CTX_data_scene(C);
        Object *obedit= CTX_data_edit_object(C);
        char *p, *p2;
        int i;
@@ -307,8 +308,8 @@ static int insert_lorem_exec(bContext *C, wmOperator *op)
        insert_into_textbuf(obedit, '\n');
        insert_into_textbuf(obedit, '\n');      
 
-       DAG_id_flush_update(obedit->data, OB_RECALC_DATA);
-       WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data);
+       DAG_object_flush_update(scene, obedit, OB_RECALC_DATA);
+       WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_DATA, obedit);
 
        return OPERATOR_FINISHED;
 }
@@ -613,6 +614,7 @@ static EnumPropertyItem style_items[]= {
 
 static int set_style(bContext *C, int style, int clear)
 {
+       Scene *scene= CTX_data_scene(C);
        Object *obedit= CTX_data_edit_object(C);
        Curve *cu= obedit->data;
        EditFont *ef= cu->editfont;
@@ -628,8 +630,8 @@ static int set_style(bContext *C, int style, int clear)
                        ef->textbufinfo[i].flag |= style;
        }
 
-       DAG_id_flush_update(obedit->data, OB_RECALC_DATA);
-       WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data);
+       DAG_object_flush_update(scene, obedit, OB_RECALC_DATA);
+       WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_DATA, obedit);
 
        return OPERATOR_FINISHED;
 }