From 0703c24fcb4de048af3056442b6935689bea06b1 Mon Sep 17 00:00:00 2001 From: dooglus Date: Sun, 21 Oct 2007 21:36:35 +0000 Subject: [PATCH] Don't modify the target type that was requested when calculating what type to use for target 'auto'. git-svn-id: http://svn.voria.com/code@941 1f10aa63-cdf2-0310-b900-c93c546f37ac --- synfig-studio/trunk/src/gtkmm/render.cpp | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/synfig-studio/trunk/src/gtkmm/render.cpp b/synfig-studio/trunk/src/gtkmm/render.cpp index 43ea5b6..6ce562e 100644 --- a/synfig-studio/trunk/src/gtkmm/render.cpp +++ b/synfig-studio/trunk/src/gtkmm/render.cpp @@ -237,6 +237,7 @@ void RenderSettings::on_render_pressed() { String filename=entry_filename.get_text(); + synfig::String calculated_target_name(target_name); if(filename.empty()) { @@ -246,7 +247,7 @@ RenderSettings::on_render_pressed() // If the target type is not yet defined, // try to figure it out from the outfile. - if(target_name.empty()) + if(calculated_target_name.empty()) { try { @@ -255,12 +256,12 @@ RenderSettings::on_render_pressed() synfig::info("render target filename: '%s'; extension: '%s'", filename.c_str(), ext.c_str()); if(Target::ext_book().count(ext)) { - target_name=Target::ext_book()[ext]; - synfig::info("'%s' is a known extension - using target '%s'", ext.c_str(), target_name.c_str()); + calculated_target_name=Target::ext_book()[ext]; + synfig::info("'%s' is a known extension - using target '%s'", ext.c_str(), calculated_target_name.c_str()); } else { - target_name=ext; + calculated_target_name=ext; synfig::info("unknown extension"); } } @@ -271,13 +272,13 @@ RenderSettings::on_render_pressed() } } - if(filename.empty() && target_name!="null") + if(filename.empty() && calculated_target_name!="null") { canvas_interface_->get_ui_interface()->error(_("A filename is required for this target")); return; } - Target::Handle target=Target::create(target_name,filename); + Target::Handle target=Target::create(calculated_target_name,filename); if(!target) { canvas_interface_->get_ui_interface()->error(_("Unable to create target for ")+filename); -- 2.7.4