diff options
| author | bulia byak <buliabyak@gmail.com> | 2006-04-09 05:32:24 +0000 |
|---|---|---|
| committer | buliabyak <buliabyak@users.sourceforge.net> | 2006-04-09 05:32:24 +0000 |
| commit | 2ad6f4cb234f6a87d4784363a2d83438c948bf55 (patch) | |
| tree | f96467dc3fae52a6f6c232ef4a29c8b305cc5895 /src/sp-text.cpp | |
| parent | Purge of OptionMenu (diff) | |
| download | inkscape-2ad6f4cb234f6a87d4784363a2d83438c948bf55.tar.gz inkscape-2ad6f4cb234f6a87d4784363a2d83438c948bf55.zip | |
Before the rev 10880 fix in xml/simple-node.cpp, text updating when dragging gradient handle worked solely due to a bug: a fake attribute change was fired on style= though it did not in fact change. Now that these fake change events are eliminated, we need to explicitly update the style of the text's arena items in _modified, same as is done e.g. in sp_shape_modified.
(bzr r461)
Diffstat (limited to 'src/sp-text.cpp')
| -rw-r--r-- | src/sp-text.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/sp-text.cpp b/src/sp-text.cpp index 3bbb3b892..c1c4acae4 100644 --- a/src/sp-text.cpp +++ b/src/sp-text.cpp @@ -263,6 +263,20 @@ sp_text_modified (SPObject *object, guint flags) guint cflags = (flags & SP_OBJECT_MODIFIED_CASCADE); if (flags & SP_OBJECT_MODIFIED_FLAG) cflags |= SP_OBJECT_PARENT_MODIFIED_FLAG; + // FIXME: all that we need to do here is nr_arena_glyphs_[group_]set_style, to set the changed + // style, but there's no easy way to access the arena glyphs or glyph groups corresponding to a + // text object. Therefore we do here the same as in _update, that is, destroy all arena items + // and create new ones. This is probably quite wasteful. + if (flags & ( SP_OBJECT_STYLE_MODIFIED_FLAG )) { + SPText *text = SP_TEXT (object); + NRRect paintbox; + sp_item_invoke_bbox(text, &paintbox, NR::identity(), TRUE); + for (SPItemView* v = text->display; v != NULL; v = v->next) { + text->_clearFlow(NR_ARENA_GROUP(v->arenaitem)); + text->layout.show(NR_ARENA_GROUP(v->arenaitem), &paintbox); + } + } + /* Create temporary list of children */ GSList *l = NULL; SPObject *child; |
