Info: Don't print an urgency detail table is the value is zero

This commit is contained in:
Paul Beckingham 2015-04-05 12:00:08 -04:00
parent f9c99624b2
commit 3f457dc744

View file

@ -391,8 +391,10 @@ int CmdInfo::execute (std::string& output)
} }
} }
// Create a second table, containing urgency details. // Create a second table, containing urgency details, if necessary.
ViewText urgencyDetails; ViewText urgencyDetails;
if (task->urgency () > 0.0)
{
if (context.color ()) if (context.color ())
{ {
Color alternate (context.config.get ("color.alternate")); Color alternate (context.config.get ("color.alternate"));
@ -488,6 +490,7 @@ int CmdInfo::execute (std::string& output)
urgencyDetails.set (row, 5, rightJustify ("------", 6)); urgencyDetails.set (row, 5, rightJustify ("------", 6));
row = urgencyDetails.addRow (); row = urgencyDetails.addRow ();
urgencyDetails.set (row, 5, rightJustify (format (task->urgency (), 4, 4), 6)); urgencyDetails.set (row, 5, rightJustify (format (task->urgency (), 4, 4), 6));
}
// Create a third table, containing undo log change details. // Create a third table, containing undo log change details.
ViewText journal; ViewText journal;