From bff868145da98c988c643a34c5296c51457a4a99 Mon Sep 17 00:00:00 2001 From: Paul Beckingham Date: Mon, 30 Jan 2012 01:00:45 -0500 Subject: [PATCH] Bug #901 - Fixed bug #901, which was preventing multiple IDs and UUIDs from being used as a filter (thanks to Bryce Harrington). --- ChangeLog | 2 ++ src/A3.cpp | 29 +++++++++++++++-------------- 2 files changed, 17 insertions(+), 14 deletions(-) diff --git a/ChangeLog b/ChangeLog index 90a1b4704..79b0f0f70 100644 --- a/ChangeLog +++ b/ChangeLog @@ -238,6 +238,8 @@ (thanks to Eli Lev). + Fixed bug #899, which displayed incorrect project completion numbers (thanks to Paul-Gheorghe Barbu). + + Fixed bug #901, which was preventing multiple IDs and UUIDs from being used + as a filter (thanks to Bryce Harrington). # Untracked Bugs, biggest first. + Fixed bug that required the '%YAML' prologue in a YAML import. diff --git a/src/A3.cpp b/src/A3.cpp index e5fc19b00..891e97c7d 100644 --- a/src/A3.cpp +++ b/src/A3.cpp @@ -450,7 +450,8 @@ void A3::inject_defaults () if (arg->_category == Arg::cat_command) found_command = true; -/* TODO no "id" or "uuid" categories exist at this time. Hmm. +/* TODO no "id" or "uuid" categories exist at this time. + This kills the auto-info feature. else if (arg->_category == Arg::cat_id || arg->_category == Arg::cat_uuid) found_sequence = true; @@ -789,19 +790,6 @@ const A3 A3::tokenize (const A3& input) const found_something_after_sequence = true; } - else if (is_id (n, s)) - { - if (found_something_after_sequence) - { - output.push_back (Arg (s, Arg::type_number, Arg::cat_literal)); - } - else - { - output.push_back (Arg (s, Arg::type_number, Arg::cat_id)); - found_sequence = true; - } - } - else if (is_uuid (n, s)) { if (found_something_after_sequence) @@ -815,6 +803,19 @@ const A3 A3::tokenize (const A3& input) const } } + else if (is_id (n, s)) + { + if (found_something_after_sequence) + { + output.push_back (Arg (s, Arg::type_number, Arg::cat_literal)); + } + else + { + output.push_back (Arg (s, Arg::type_number, Arg::cat_id)); + found_sequence = true; + } + } + else if (is_number (n, s)) { output.push_back (Arg (s, Arg::type_number, Arg::cat_literal));