mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-25 00:58:06 -05:00
Null detection for labels and got rid of the fprintf stuff that caused raised eyebrows and stern disapproval from Mcoletti
git-svn-id: http://svn.osgeo.org/qgis/trunk@1065 c8812cc2-4d05-0410-92ff-de0c093fc19c
This commit is contained in:
parent
b19df29e5e
commit
8db24974d5
@ -57,16 +57,19 @@ void WayPointToShape::writeDbfRecord (DBFHandle theDbfHandle, int theRecordIdInt
|
||||
std::cerr << "writeDbfRecord : " << theRecordIdInt << " - " << theLabel;
|
||||
if (! DBFWriteIntegerAttribute(theDbfHandle, theRecordIdInt, 0, theRecordIdInt))
|
||||
{
|
||||
fprintf(stderr, "DBFWriteIntegerAttribute(hDBFs,%d,0,%d) failed.\n", theRecordIdInt, theRecordIdInt );
|
||||
std::cerr << "DBFWriteIntegerAttribute failed. : " << theRecordIdInt << " - " << theRecordIdInt <<endl;
|
||||
|
||||
//exit(ERR_DBFWRITEINTEGERATTRIBUTE);
|
||||
}
|
||||
if (! DBFWriteStringAttribute(theDbfHandle, theRecordIdInt, 1, theLabel))
|
||||
if (theLabel != NULL)
|
||||
{
|
||||
fprintf(stderr, "DBFWriteStringAttribute(hDBFs,%d,1,%s) failed.\n", theRecordIdInt, theLabel );
|
||||
if (! DBFWriteStringAttribute(theDbfHandle, theRecordIdInt, 1, theLabel))
|
||||
{
|
||||
std::cerr << "DBFWriteStringAttribute failed. : " << theRecordIdInt << " - " << theLabel <<endl;
|
||||
//exit(ERR_DBFWRITEINTEGERATTRIBUTE);
|
||||
}
|
||||
std::cerr << " - OK! " << std::endl;
|
||||
}
|
||||
std::cerr << " - OK! " << std::endl;
|
||||
//DBFWriteIntegerAttribute(theDbfHandle, theRecordIdInt, 0, theRecordIdInt);
|
||||
//DBFWriteStringAttribute(theDbfHandle, theRecordIdInt, 1, theLabel);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user