Code

Fix Bug #669537 - crash when activating "snap to path"
authorAdonis Papaderos <ado.papas@yahoo.gr>
Thu, 25 Nov 2010 11:05:29 +0000 (13:05 +0200)
committerAdonis Papaderos <ado.papas@yahoo.gr>
Thu, 25 Nov 2010 11:05:29 +0000 (13:05 +0200)
mode after changing stroke width (no focus-out-event)

src/widgets/toolbox.cpp

index 9a2fc8dd2f2721326395e84be0ab60997a1548da..a6740fceca76aa36fc764c545973cc261e0c0062 100644 (file)
@@ -8063,17 +8063,18 @@ static void connector_tb_event_attr_changed(Inkscape::XML::Node *repr,
     if (g_object_get_data(G_OBJECT(tbl), "freeze")) {
         return;
     }
-    if (strcmp(name, "inkscape:connector-spacing") == 0)
-    {
-        GtkAdjustment *adj = (GtkAdjustment*)
-                gtk_object_get_data(GTK_OBJECT(tbl), "spacing");
-        gdouble spacing = defaultConnSpacing;
-        sp_repr_get_double(repr, "inkscape:connector-spacing", &spacing);
-
-        gtk_adjustment_set_value(adj, spacing);
-        gtk_adjustment_value_changed(adj);
+    if (strcmp(name, "inkscape:connector-spacing") != 0) {
+        return;
     }
 
+    GtkAdjustment *adj = (GtkAdjustment*)
+            gtk_object_get_data(GTK_OBJECT(tbl), "spacing");
+    gdouble spacing = defaultConnSpacing;
+    sp_repr_get_double(repr, "inkscape:connector-spacing", &spacing);
+
+    gtk_adjustment_set_value(adj, spacing);
+    gtk_adjustment_value_changed(adj);
+
     spinbutton_defocus(GTK_OBJECT(tbl));
 }