Mercurial > MadButterfly
diff nodejs/shapes.cc @ 885:2b492008ce26 abs_n_rel_center
Told redraw manager that a text is dirty when change its text at JS
author | Thinker K.F. Li <thinker@codemud.net> |
---|---|
date | Sun, 26 Sep 2010 00:54:12 +0800 |
parents | 586e50f82c1f |
children | df6ee4568ca2 |
line wrap: on
line diff
--- a/nodejs/shapes.cc Sun Sep 26 00:53:16 2010 +0800 +++ b/nodejs/shapes.cc Sun Sep 26 00:54:12 2010 +0800 @@ -70,6 +70,25 @@ } } +static void +xnjsmb_sh_stext_set_text(shape_t *sh, Handle<Object> self, + const char *txt) { + Handle<Object> rt; + redraw_man_t *rdman; + + sh_stext_set_text(sh, txt); + + /* + * Mark changed. + */ + rt = GET(self, "mbrt")->ToObject(); + ASSERT(rt != NULL); + rdman = xnjsmb_rt_rdman(rt); + + if(sh_get_coord(sh)) + rdman_shape_changed(rdman, sh); +} + /*! \brief Set style blocks for a stext object from JS. * * A style block is style setting of a chip of text. It is a 3-tuple,