ColParent: Fixed short form truncation

- The short form now takes the first 8 characters, not the last.
  No one noticed.
This commit is contained in:
Paul Beckingham 2015-10-31 15:53:15 -04:00
parent 668fd2301e
commit 65b8fb7bce

View file

@ -41,7 +41,7 @@ ColumnParent::ColumnParent ()
_label = STRING_COLUMN_LABEL_PARENT;
_modifiable = false;
_styles = {"long", "short"};
_examples = {"f30cb9c3-3fc0-483f-bfb2-3bf134f00694", "34f00694"};
_examples = {"f30cb9c3-3fc0-483f-bfb2-3bf134f00694", "f30cb9c3"};
}
////////////////////////////////////////////////////////////////////////////////
@ -75,11 +75,12 @@ void ColumnParent::render (
{
// f30cb9c3-3fc0-483f-bfb2-3bf134f00694 default
// 34f00694 short
if (_style == "default" || _style == "long")
if (_style == "default" ||
_style == "long")
renderStringLeft (lines, width, color, task.get(_name));
else if (_style == "short")
renderStringLeft (lines, width, color, task.get (_name).substr (28));
renderStringLeft (lines, width, color, task.get (_name).substr (0, 8));
}
}