diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2012-09-10 12:27:00 -0700 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2012-09-10 12:27:00 -0700 |
commit | 78c5aa9f071ab56e56bf760e3e7fc7f0f0d1b1ff (patch) | |
tree | 1f71fe795dd2e793a91caa25edb9dc695f007a1a /parse-xml.c | |
parent | b73f29fea3ae88a06d8f773a6d48510520c127f0 (diff) | |
download | subsurface-78c5aa9f071ab56e56bf760e3e7fc7f0f0d1b1ff.tar.gz |
Change behavior for the existing filename
Previously we always picked the last file that was openend as the file
name to save to. That seems counterintuitive when importing files or when
opening multiple files. Especially if Subsurface was executed without a
file on the command line and we are using the default file.
Now we only remember a file name if it was the first one to ever be
openend or if it was used in save-as.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'parse-xml.c')
-rw-r--r-- | parse-xml.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/parse-xml.c b/parse-xml.c index 1c4db7d9d..a4ae81b25 100644 --- a/parse-xml.c +++ b/parse-xml.c @@ -1475,9 +1475,8 @@ void parse_xml_buffer(const char *url, const char *buffer, int size, GError **er } return; } - /* we assume that the last (or only) filename passed as argument is a - * great filename to use as default when saving the dives */ - set_filename(url); + /* remember, if necessary, that this is the filename to store to */ + set_filename(url, FALSE); reset_all(); dive_start(); #ifdef XSLT |