From: buliabyak Date: Wed, 27 Jun 2007 00:47:49 +0000 (+0000) Subject: fix style querying: now all objects have style, so to go up from SPStrings we need... X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=67899d60d43b853406adcf0633b79256a193176b;p=inkscape.git fix style querying: now all objects have style, so to go up from SPStrings we need a different check --- 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); }