Code

runaway random number widget workaround
authorjohanengelen <johanengelen@users.sourceforge.net>
Tue, 16 Oct 2007 18:18:24 +0000 (18:18 +0000)
committerjohanengelen <johanengelen@users.sourceforge.net>
Tue, 16 Oct 2007 18:18:24 +0000 (18:18 +0000)
src/ui/widget/registered-widget.cpp

index 7125318ca705df77e4e369a484c5865987dc4844..e87a57bc7ef0a8a71a7823a6e086109e3dba8ae0 100644 (file)
@@ -650,22 +650,17 @@ RegisteredRandom::on_value_changed()
         return;
     }
 
-    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->getStartSeed();
 
+    _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);
 }