From: dooglus Date: Wed, 24 Sep 2008 21:57:49 +0000 (+0000) Subject: Fix 1988939: Error trying to change value of Filename property. X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=56e1068a33331fbfcdd14c9cd9ec41a6ba5cf892;p=synfig.git Fix 1988939: Error trying to change value of Filename property. git-svn-id: https://synfig.svn.sourceforge.net/svnroot/synfig@2071 1f10aa63-cdf2-0310-b900-c93c546f37ac --- diff --git a/synfig-studio/trunk/src/gtkmm/widget_filename.cpp b/synfig-studio/trunk/src/gtkmm/widget_filename.cpp index 91538c0..a178614 100644 --- a/synfig-studio/trunk/src/gtkmm/widget_filename.cpp +++ b/synfig-studio/trunk/src/gtkmm/widget_filename.cpp @@ -34,6 +34,7 @@ #include #include "widget_filename.h" #include "app.h" +#include "canvasview.h" #include "general.h" @@ -111,6 +112,11 @@ Widget_Filename::on_button_choose_pressed() string filename=entry_filename->get_text(); if(filename.empty()) filename="."; + else + filename = etl::absolute_path( + etl::dirname(App::get_selected_canvas_view()->get_canvas()->get_file_name()) + + ETL_DIRECTORY_SEPARATOR + + filename); if(App::dialog_open_file(_("Choose File"), filename, MISC_DIR_PREFERENCE)) entry_filename->set_text(filename); }