Code

Updated cases for attributes added in <color-profile> support
[inkscape.git] / src / text-context.cpp
index d59ba6bdf0b464a855420e93d6deac3edcc5fb8b..3fcb3058a354e41325e34be204dc7bc2d14dfeae 100644 (file)
@@ -258,7 +258,6 @@ sp_text_context_setup(SPEventContext *ec)
             ec->shape_repr = shape_repr;
             Inkscape::GC::anchor(shape_repr);
             sp_repr_add_listener(shape_repr, &ec_shape_repr_events, ec);
-            sp_repr_synthesize_events(shape_repr, &ec_shape_repr_events, ec);
         }
     }
 
@@ -519,7 +518,8 @@ insert_uni_char(SPTextContext *const tc)
     tc->unipos = 0;
     tc->uni[tc->unipos] = '\0';
 
-    if (!g_unichar_isprint((gunichar) uv)) {
+    if ( !g_unichar_isprint(static_cast<gunichar>(uv))
+         && !(g_unichar_validate(static_cast<gunichar>(uv)) && (g_unichar_type(static_cast<gunichar>(uv)) == G_UNICODE_PRIVATE_USE) ) ) {
         // This may be due to bad input, so it goes to statusbar.
         tc->desktop->messageStack()->flash(Inkscape::ERROR_MESSAGE,
                                            _("Non-printable character"));
@@ -1285,7 +1285,6 @@ sp_text_context_selection_changed(Inkscape::Selection *selection, SPTextContext
             ec->shape_repr = shape_repr;
             Inkscape::GC::anchor(shape_repr);
             sp_repr_add_listener(shape_repr, &ec_shape_repr_events, ec);
-            sp_repr_synthesize_events(shape_repr, &ec_shape_repr_events, ec);
         }
     }