diff options
| author | bulia byak <buliabyak@gmail.com> | 2007-06-27 00:47:49 +0000 |
|---|---|---|
| committer | buliabyak <buliabyak@users.sourceforge.net> | 2007-06-27 00:47:49 +0000 |
| commit | bb290a86675239587c64b5cc46c203c829e33e48 (patch) | |
| tree | e94b7ce9af12f5ac486871aa0b779e89c1c27ddb /src | |
| parent | Fix "parsing error" with check-markup. (diff) | |
| download | inkscape-bb290a86675239587c64b5cc46c203c829e33e48.tar.gz inkscape-bb290a86675239587c64b5cc46c203c829e33e48.zip | |
fix style querying: now all objects have style, so to go up from SPStrings we need a different check
(bzr r3112)
Diffstat (limited to 'src')
| -rw-r--r-- | src/text-context.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/text-context.cpp b/src/text-context.cpp index 670a863ac..b45cd6e58 100644 --- a/src/text-context.cpp +++ b/src/text-context.cpp @@ -1402,8 +1402,9 @@ sp_text_context_style_query(SPStyle *style, int property, SPTextContext *tc) layout->getSourceOfCharacter(it, &rawptr); pos_obj = SP_OBJECT(rawptr); if (pos_obj == 0) continue; - while (SP_OBJECT_STYLE(pos_obj) == NULL && SP_OBJECT_PARENT(pos_obj)) - pos_obj = SP_OBJECT_PARENT(pos_obj); // SPStrings don't have style + while (SP_IS_STRING(pos_obj) && SP_OBJECT_PARENT(pos_obj)) { + pos_obj = SP_OBJECT_PARENT(pos_obj); // SPStrings don't have style + } styles_list = g_slist_prepend(styles_list, (gpointer)pos_obj); } |
