Use American spelling of 'initialise'.
[synfig.git] / synfig-studio / trunk / src / gtkmm / dock_navigator.cpp
index f002b66..c558960 100644 (file)
@@ -6,6 +6,7 @@
 **
 **     \legal
 **     Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley
+**     Copyright (c) 2007 Chris Moore
 **
 **     This package is free software; you can redistribute it and/or
 **     modify it under the terms of the GNU General Public License as
@@ -166,8 +167,8 @@ void studio::Widget_NavView::on_start_render()
 
                renderer = new AsyncRenderer(targ);
                renderer->signal_success().connect(sigc::mem_fun(*this,&Widget_NavView::on_finish_render));
-               renderer->start();
                dirty = false;
+               renderer->start();
        }
 }
 
@@ -257,6 +258,11 @@ static double zoom_to_unit(double f)
 
 bool studio::Widget_NavView::on_expose_draw(GdkEventExpose */*exp*/)
 {
+       // don't redraw if the previous redraw is still running single-threaded
+       // or we end up destroying the renderer that's rendering it
+       if (App::single_threaded && renderer && renderer->updating)
+               return false;
+
        //print out the zoom
        //HACK kind of...
        //zoom_print.set_text(strprintf("%.1f%%",100*unit_to_zoom(adj_zoom.get_value())));