Commit 3dac3388 authored by Andy Wilson's avatar Andy Wilson
Browse files

ENH: Clearer warning messages when the label arrays are not found

parent 90d5785e
......@@ -49,7 +49,7 @@ using vtksys_ios::ofstream;
# define SNPRINTF snprintf
#endif
vtkCxxRevisionMacro(vtkDynamic2DLabelMapper, "1.6");
vtkCxxRevisionMacro(vtkDynamic2DLabelMapper, "1.7");
vtkStandardNewMacro(vtkDynamic2DLabelMapper);
//----------------------------------------------------------------------------
......@@ -227,7 +227,19 @@ void vtkDynamic2DLabelMapper::RenderOpaqueGeometry(vtkViewport *viewport,
}
else if ( !stringData )
{
vtkWarningMacro(<<"Could not find label array");
if (this->FieldDataName)
{
vtkWarningMacro(<< "Could not find label array ("
<< this->FieldDataName << ") "
<< "in input.");
}
else
{
vtkWarningMacro(<< "Could not find label array ("
<< "index " << this->FieldDataArray << ") "
<< "in input.");
}
return;
}
......
......@@ -26,7 +26,7 @@
#include "vtkTextProperty.h"
#include "vtkTransform.h"
vtkCxxRevisionMacro(vtkLabeledDataMapper, "1.49");
vtkCxxRevisionMacro(vtkLabeledDataMapper, "1.50");
vtkStandardNewMacro(vtkLabeledDataMapper);
vtkCxxSetObjectMacro(vtkLabeledDataMapper,LabelTextProperty,vtkTextProperty);
......@@ -286,7 +286,19 @@ void vtkLabeledDataMapper::RenderOpaqueGeometry(vtkViewport *viewport,
}
else
{
vtkErrorMacro(<<"Need input data to render labels (3)");
if (this->FieldDataName)
{
vtkWarningMacro(<< "Could not find label array ("
<< this->FieldDataName << ") "
<< "in input.");
}
else
{
vtkWarningMacro(<< "Could not find label array ("
<< "index " << this->FieldDataArray << ") "
<< "in input.");
}
return;
}
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment