ColParent: Now uses ::renderStringLeft

This commit is contained in:
Paul Beckingham 2015-10-31 15:44:05 -04:00
parent 04c3e9e537
commit 668fd2301e

View file

@ -37,7 +37,6 @@ extern Context context;
ColumnParent::ColumnParent ()
{
_name = "parent";
_type = "string";
_style = "long";
_label = STRING_COLUMN_LABEL_PARENT;
_modifiable = false;
@ -76,19 +75,11 @@ void ColumnParent::render (
{
// f30cb9c3-3fc0-483f-bfb2-3bf134f00694 default
// 34f00694 short
if (_style == "default" ||
_style == "long")
{
lines.push_back (color.colorize (leftJustify (task.get (_name), width)));
}
if (_style == "default" || _style == "long")
renderStringLeft (lines, width, color, task.get(_name));
else if (_style == "short")
{
if (task.has (_name))
lines.push_back (color.colorize (leftJustify (task.get (_name).substr (28), width)));
else
lines.push_back (color.colorize (leftJustify ("", width)));
}
renderStringLeft (lines, width, color, task.get (_name).substr (28));
}
}