From 559566751ddd29caf2cd74c3d44982c907bd1020 Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Wed, 28 Oct 2009 01:17:10 -0400 Subject: Sort by default unless --unsorted is selected --- src/chain.cc | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/chain.cc') diff --git a/src/chain.cc b/src/chain.cc index 25f4833c..018b3812 100644 --- a/src/chain.cc +++ b/src/chain.cc @@ -114,6 +114,10 @@ post_handler_ptr chain_post_handlers(report_t& report, else handler.reset(new sort_posts(handler, report.HANDLER(sort_).str())); } + else if (! report.HANDLED(period_) && + ! report.HANDLED(unsorted)) { + handler.reset(new sort_posts(handler, "date")); + } // collapse_posts causes xacts with multiple posts to appear as xacts // with a subtotaled post for each commodity used. @@ -135,6 +139,10 @@ post_handler_ptr chain_post_handlers(report_t& report, else if (report.HANDLED(subtotal)) handler.reset(new subtotal_posts(handler, expr)); } + else if (! report.HANDLED(period_) && + ! report.HANDLED(unsorted)) { + handler.reset(new sort_posts(handler, "date")); + } if (report.HANDLED(dow)) handler.reset(new dow_posts(handler, expr)); -- cgit v1.2.3