Code

ok, fix another crash caused by GTK's broken spinbuttons
authorbuliabyak <buliabyak@users.sourceforge.net>
Sun, 12 Nov 2006 01:57:04 +0000 (01:57 +0000)
committerbuliabyak <buliabyak@users.sourceforge.net>
Sun, 12 Nov 2006 01:57:04 +0000 (01:57 +0000)
src/widgets/select-toolbar.cpp

index c1a92aa76f4c26556771ae8648887c54a4745e0c..ebdc267c1c606148ac09148221790f476b1055bc 100644 (file)
@@ -42,7 +42,7 @@
 #include "selection-chemistry.h"
 #include "sp-item-transform.h"
 #include "message-stack.h"
-
+#include "display/sp-canvas.h"
 
 static void
 sp_selection_layout_widget_update(SPWidget *spw, Inkscape::Selection *sel)
@@ -213,6 +213,10 @@ sp_object_layout_any_value_changed(GtkAdjustment *adj, SPWidget *spw)
                                      sv > 5e-4 ? "selector:toolbar:scale:vertical" : NULL );
 
     if (actionkey != NULL) {
+
+        // FIXME: fix for GTK breakage, see comment in SelectedStyle::on_opacity_changed
+        sp_canvas_force_full_redraw_after_interruptions(sp_desktop_canvas(desktop), 0);
+
         gdouble strokewidth = stroke_average_width (selection->itemList());
         int transform_stroke = prefs_get_int_attribute ("options.transform", "stroke", 1);
 
@@ -224,6 +228,9 @@ sp_object_layout_any_value_changed(GtkAdjustment *adj, SPWidget *spw)
 
         // defocus spinbuttons by moving focus to the canvas, unless "stay" is on
         spinbutton_defocus(GTK_OBJECT(spw));
+
+        // resume interruptibility
+        sp_canvas_end_forced_full_redraws(sp_desktop_canvas(desktop));
     }
 
     gtk_object_set_data(GTK_OBJECT(spw), "update", GINT_TO_POINTER(FALSE));