diff scripts/plot/util/private/__add_default_menu__.m @ 19774:ca6fc882177d

Fix working directory of Figure Save dialog between CLI and GUI (bug #44175). * uiputfile.m: Check for a directory before calling fileparts which automatically assumes the last element is a file. * __add_default_menu__.m: Use default filename "untitled.pdf" for saving FLTK figures.
author Rik <rik@octave.org>
date Tue, 17 Feb 2015 15:24:05 -0800
parents 60ce9f86ecfe
children 55a4173f1624
line wrap: on
line diff
--- a/scripts/plot/util/private/__add_default_menu__.m	Tue Feb 17 13:34:32 2015 -0800
+++ b/scripts/plot/util/private/__add_default_menu__.m	Tue Feb 17 15:24:05 2015 -0800
@@ -76,7 +76,7 @@
   [filename, filedir] = uiputfile ({"*.pdf;*.ps;*.gif;*.png;*.jpg",
                                     "Supported Graphic Formats"},
                                    "Save Figure",
-                                   pwd);
+                                   [pwd, filesep, "untitled.pdf"]);
   if (filename != 0)
     fname = [filedir filesep() filename];
     obj = findall (gcbf, "label", "&Save");