Code

fix bug 168751 (sf1749738)
authorbuliabyak <buliabyak@users.sourceforge.net>
Sun, 30 Dec 2007 07:46:30 +0000 (07:46 +0000)
committerbuliabyak <buliabyak@users.sourceforge.net>
Sun, 30 Dec 2007 07:46:30 +0000 (07:46 +0000)
src/sp-text.cpp
src/text-chemistry.cpp
src/text-context.cpp

index 1c677edb2d7c014a0b689e557e7be8bf1ef38c5a..1609afa92aef0cefef0850bde09d13a6655ca914 100644 (file)
@@ -194,7 +194,7 @@ sp_text_child_added (SPObject *object, Inkscape::XML::Node *rch, Inkscape::XML::
     if (((SPObjectClass *) text_parent_class)->child_added)
         ((SPObjectClass *) text_parent_class)->child_added (object, rch, ref);
 
-    text->requestDisplayUpdate(SP_OBJECT_MODIFIED_FLAG | SP_TEXT_CONTENT_MODIFIED_FLAG);
+    text->requestDisplayUpdate(SP_OBJECT_MODIFIED_FLAG | SP_TEXT_CONTENT_MODIFIED_FLAG | SP_TEXT_LAYOUT_MODIFIED_FLAG);
 }
 
 static void
index e1eaa47fb98e6735167471dd87573714444c1d8a..ef5bd90bf3a48efb2facdb28edfad890f1bd4af5 100644 (file)
@@ -221,9 +221,9 @@ text_remove_from_path()
     if (!did) {
         sp_desktop_message_stack(desktop)->flash(Inkscape::ERROR_MESSAGE, _("<b>No texts-on-paths</b> in the selection."));
     } else {
-        selection->setList(g_slist_copy((GSList *) selection->itemList())); // reselect to update statusbar description
         sp_document_done(sp_desktop_document(desktop), SP_VERB_CONTEXT_TEXT, 
                          _("Remove text from path"));
+        selection->setList(g_slist_copy((GSList *) selection->itemList())); // reselect to update statusbar description
     }
 }
 
index f97bb26ac281dfe3235895277373e86c74c770c4..b79dce6c92dee88a5a18ed104d18105b694288fa 100644 (file)
@@ -1469,8 +1469,9 @@ sp_text_context_style_query(SPStyle *style, int property, SPTextContext *tc)
         SPObject const *pos_obj = 0;
         void *rawptr = 0;
         layout->getSourceOfCharacter(it, &rawptr);
+        if (!rawptr || !SP_IS_OBJECT(rawptr))
+            continue;
         pos_obj = SP_OBJECT(rawptr);
-        if (pos_obj == 0) continue;
         while (SP_IS_STRING(pos_obj) && SP_OBJECT_PARENT(pos_obj)) {
            pos_obj = SP_OBJECT_PARENT(pos_obj);   // SPStrings don't have style
         }