From: dooglus Date: Tue, 6 Mar 2007 22:35:17 +0000 (+0000) Subject: Fix 1674142: We need to process pending events whether using close() or safe_close... X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=b959d0db78c06f80230a6e162725e1e3e2f38283;p=synfig.git Fix 1674142: We need to process pending events whether using close() or safe_close(). Not doing this was causing 'revert' to crash. git-svn-id: http://svn.voria.com/code@265 1f10aa63-cdf2-0310-b900-c93c546f37ac --- diff --git a/synfig-studio/trunk/src/gtkmm/instance.cpp b/synfig-studio/trunk/src/gtkmm/instance.cpp index 42a6ec8..75f6fdf 100644 --- a/synfig-studio/trunk/src/gtkmm/instance.cpp +++ b/synfig-studio/trunk/src/gtkmm/instance.cpp @@ -322,6 +322,8 @@ Instance::close() // 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()) @@ -634,8 +636,6 @@ Instance::safe_close() close(); - while(studio::App::events_pending())studio::App::iteration(false); - return true; }