Prevent "Save before closing" dialog from appearing at startup.

Caused by simply loading the transaction report, which called
gnc-get-current-book and that it in turn creates a session if one
doesn't already exist.
This commit is contained in:
John Ralls 2017-12-30 12:06:52 -08:00
parent 7feb9c65cf
commit 5823f1b2bb
2 changed files with 4 additions and 1 deletions

View File

@ -210,7 +210,8 @@ options specified in the Options panels."))
(cons 'tip (_ "Sort by description."))
(cons 'renderer-fn #f)))
(if (qof-book-use-split-action-for-num-field (gnc-get-current-book))
(if (and (gnc-current-session-exist)
(qof-book-use-split-action-for-num-field (gnc-get-current-book)))
(cons 'number (list (cons 'sortkey (list SPLIT-ACTION))
(cons 'split-sortvalue #f)
(cons 'text (_ "Number/Action"))

View File

@ -31,6 +31,7 @@
#include "gnc-filepath-utils.h"
#include "gnc-pricedb.h"
#include "gnc-lot.h"
#include "gnc-session.h"
#include "gnc-hooks-scm.h"
#include "engine-helpers.h"
#include "engine-helpers-guile.h"
@ -187,6 +188,7 @@ SplitList * qof_query_run_subquery (QofQuery *q, const QofQuery *q);
%typemap(in) QofQueryParamList * "$1 = gnc_query_scm2path($input);"
%include <gnc-session.h>
%include <Query.h>
%ignore qof_query_run;
%ignore qof_query_last_run;