From e55b95b415e28e053ad3941f9bd3c41ea461ca58 Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Fri, 21 Oct 2011 06:12:04 -0700 Subject: [PATCH] Make the first filename on the command line the default filename From a usecase point of view - if we call with multiple file names then most likely it's subsurface MyDives.xml new_dive1.xml new_dive2.xml and therefore the existing "database" is the first filename, not the last one (as the current implementation assumes). Frankly, this is a bit arbitrary - but this one seems to make more sense. Signed-off-by: Dirk Hohndel --- gtk-gui.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gtk-gui.c b/gtk-gui.c index 351e7b9..b28ca25 100644 --- a/gtk-gui.c +++ b/gtk-gui.c @@ -989,7 +989,7 @@ void update_progressbar(progressbar_t *progress, double value) void set_filename(const char *filename) { - if (filename) + if (!existing_filename && filename) existing_filename = strdup(filename); return; } -- 2.45.2