X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=main.c;h=ee09b9a82e50b4ee0bceda0ef9eebdd7cadaae64;hb=2d02ac402ac8086d946f8a815104b30142ec83e5;hp=26d2eee220bcbdcc8b4d4096aeadee336a025178;hpb=dbdd42b31f73ad8e8117d5b2a5b4ac4e061bf202;p=ext%2Fsubsurface.git diff --git a/main.c b/main.c index 26d2eee..ee09b9a 100644 --- a/main.c +++ b/main.c @@ -97,6 +97,11 @@ static void try_to_renumber(struct dive *last, int preexisting) } } +/* + * track whether we switched to importing dives + */ +static gboolean imported = FALSE; + /* * This doesn't really report anything at all. We just sort the * dives, the GUI does the reporting @@ -162,7 +167,8 @@ static void parse_argument(const char *arg) if (strcmp(arg,"--import") == 0) { /* mark the dives so far as the base, * everything after is imported */ - report_dives(TRUE); + report_dives(FALSE); + imported = TRUE; return; } /* fallthrough */ @@ -229,7 +235,7 @@ int main(int argc, char **argv) } } - report_dives(FALSE); + report_dives(imported); run_ui(); return 0;