Code

workaround for runaway spinbutton
authorbuliabyak <buliabyak@users.sourceforge.net>
Wed, 5 Sep 2007 06:10:36 +0000 (06:10 +0000)
committerbuliabyak <buliabyak@users.sourceforge.net>
Wed, 5 Sep 2007 06:10:36 +0000 (06:10 +0000)
src/ui/widget/registered-widget.cpp

index 4db4363caf76ca7389de0fcfade9975ff0acdcb5..c2c7e593c22d3289a0da6ad69d07d70af39628bb 100644 (file)
@@ -280,22 +280,17 @@ RegisteredScalar::setValue (double val)
 void
 RegisteredScalar::on_value_changed()
 {
-    if (_wr->isUpdating())
+    if (_wr->isUpdating()) {
         return;
+    }
     _wr->setUpdating (true);
 
-    // FIXME:  gtk bug?
-    // disable interruptibility: see http://inkscape.svn.sourceforge.net/viewvc/inkscape/inkscape/trunk/src/ui/widget/selected-style.cpp?r1=13149&r2=13257&sortby=date
-    SPDesktop* dt = SP_ACTIVE_DESKTOP;
-    sp_canvas_force_full_redraw_after_interruptions(sp_desktop_canvas(dt), 0);
-
     Inkscape::SVGOStringStream os;
     os << _widget->getValue();
 
+    _widget->set_sensitive(false);
     write_to_xml(os.str().c_str());
-
-    // resume interruptibility
-    sp_canvas_end_forced_full_redraws(sp_desktop_canvas(dt));
+    _widget->set_sensitive(true);
 
     _wr->setUpdating (false);
 }