Prettyfing Describe() for record types.

If a record type has a name and ODesc is set to short, we now print
the name instead of the full field list.
This commit is contained in:
Robin Sommer 2013-09-28 16:06:40 -07:00
parent dc52846b6f
commit 08c7dd3d71
2 changed files with 11 additions and 5 deletions

View file

@ -1038,10 +1038,16 @@ void RecordType::Describe(ODesc* d) const
{
if ( d->IsReadable() )
{
d->AddSP("record {");
DescribeFields(d);
d->SP();
d->Add("}");
if ( d->IsShort() && GetTypeID() )
d->Add(GetTypeID());
else
{
d->AddSP("record {");
DescribeFields(d);
d->SP();
d->Add("}");
}
}
else