Really fix 1674142: Correct the change made in r265. We need to process the pending...
authordooglus <dooglus@1f10aa63-cdf2-0310-b900-c93c546f37ac>
Thu, 8 Mar 2007 01:54:57 +0000 (01:54 +0000)
committerdooglus <dooglus@1f10aa63-cdf2-0310-b900-c93c546f37ac>
Thu, 8 Mar 2007 01:54:57 +0000 (01:54 +0000)
git-svn-id: http://svn.voria.com/code@273 1f10aa63-cdf2-0310-b900-c93c546f37ac

synfig-studio/trunk/src/gtkmm/instance.cpp

index 75f6fdf..6c4b6cb 100644 (file)
@@ -319,11 +319,12 @@ Instance::close()
        for(std::list<etl::handle<CanvasView> >::iterator iter=canvas_view_list().begin();iter!=canvas_view_list().end();iter++)
                (*iter)->hide();
 
+       // Consume pending events before deleting the canvas views
+       while(studio::App::events_pending())studio::App::iteration(false);
+
        // Delete all of the canvas views
        canvas_view_list().clear();
 
-       while(studio::App::events_pending())studio::App::iteration(false);
-
        // If there is another open instance to select,
        // go ahead and do so. If not, never mind.
        if(studio::App::instance_list.empty())