From 4df9def40ad515c9d071f23f29283cdd8d5eee86 Mon Sep 17 00:00:00 2001 From: Adonis Papaderos Date: Thu, 25 Nov 2010 13:05:29 +0200 Subject: [PATCH] Fix Bug #669537 - crash when activating "snap to path" mode after changing stroke width (no focus-out-event) --- src/widgets/toolbox.cpp | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/src/widgets/toolbox.cpp b/src/widgets/toolbox.cpp index 9a2fc8dd2..a6740fcec 100644 --- a/src/widgets/toolbox.cpp +++ b/src/widgets/toolbox.cpp @@ -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)); } -- 2.30.2