Commit a4c668be authored by LACROIX Romain's avatar LACROIX Romain

Bugfix: the DecoratorSurfaceColor failed when fed data of type QVariant<vtkStructuredGrid*>.

parent 2ec7f4e0
......@@ -80,6 +80,19 @@ dtkVisualizationDecoratorSurfaceColor::~dtkVisualizationDecoratorSurfaceColor(vo
void dtkVisualizationDecoratorSurfaceColor::setData(const QVariant& data)
{
vtkDataSet *dataset = data.value<vtkDataSet *>();
if (!dataset) {
dataset = data.value<vtkUnstructuredGrid *>();
}
if (!dataset) {
dataset = data.value<vtkStructuredGrid *>();
}
if (!dataset) {
dataset = data.value<vtkPolyData *>();
}
if (!dataset) {
dtkWarn() << Q_FUNC_INFO << "vtkDataSet is expected. Input data is not stored.";
return;
......
Markdown is supported
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