From f92b13fbf7251da67c5b2c3762e4a1cbf2fb884b Mon Sep 17 00:00:00 2001 From: Paul Beckingham Date: Fri, 26 Aug 2011 02:41:51 -0400 Subject: [PATCH] Visuals - Cleaned up 'info' command output when the task is not pending and has no ID. It displays '-' instead of the misleading "0". --- src/commands/CmdInfo.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/commands/CmdInfo.cpp b/src/commands/CmdInfo.cpp index 689158875..dfb3e70b7 100644 --- a/src/commands/CmdInfo.cpp +++ b/src/commands/CmdInfo.cpp @@ -51,7 +51,7 @@ CmdInfo::CmdInfo () // lot of sense, given that the info command shows the ID, it does mimic the // behavior of versions prior to 2.0, which the test suite relies upon. // - // One the test suite is completely modified, this can be corrected. + // Once the test suite is completely modified, this can be corrected. _displays_id = false; } @@ -100,11 +100,12 @@ int CmdInfo::execute (std::string& output) } Date now; + int row; // id - int row = view.addRow (); + row = view.addRow (); view.set (row, 0, STRING_COLUMN_LABEL_ID); - view.set (row, 1, format (task->id)); + view.set (row, 1, (task->id ? format (task->id) : "-")); std::string status = ucFirst (Task::statusToText (task->getStatus ()));