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 d727af097b
commit 7412470d66
2 changed files with 11 additions and 5 deletions

View file

@ -1048,10 +1048,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