Code

First dependency on ziptool
[inkscape.git] / src / text-context.cpp
index d59ba6bdf0b464a855420e93d6deac3edcc5fb8b..615e02d48478673e3a08f42617b36e9f8fb6194f 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"));
@@ -1030,6 +1030,7 @@ sp_text_context_root_handler(SPEventContext *const ec, GdkEvent *const event)
                                 } else {
                                     SP_DT_SELECTION(ec->desktop)->clear();
                                 }
+                                tc->nascent_object = FALSE;
                                 return TRUE;
                             case GDK_bracketleft:
                                 if (tc->text) {
@@ -1285,7 +1286,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);
         }
     }