summaryrefslogtreecommitdiffstats
path: root/main.c
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2012-09-16 06:04:37 -0400
committerGravatar Dirk Hohndel <dirk@hohndel.org>2012-09-17 21:03:30 -0400
commitd7465129bb7fc912ec89671051192983b80711c4 (patch)
tree26a65293310ae2e863b15e7cd0f4d2d6d8708e53 /main.c
parent2cadc70e3dc521b0b208587b5a9121378ff855e5 (diff)
downloadsubsurface-d7465129bb7fc912ec89671051192983b80711c4.tar.gz
Make sure dive info is displayed correctly at start
Commit cdae2869d1dd ("Show the datafile name even with no dives") was a little too aggressive in making sure that we show the correct window title - we only should call show_dive_info(NULL) if there is indeed no dive in the dive table - otherwise we display empty dive info at program start. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'main.c')
-rw-r--r--main.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/main.c b/main.c
index 3d9b43b41..2bdccd277 100644
--- a/main.c
+++ b/main.c
@@ -249,7 +249,8 @@ int main(int argc, char **argv)
set_filename(filename, FALSE);
}
report_dives(imported);
- show_dive_info(NULL);
+ if (dive_table.nr == 0)
+ show_dive_info(NULL);
run_ui();
exit_ui();
return 0;