Commit e41e1e87 authored by Menno Deij - van Rijswijk's avatar Menno Deij - van Rijswijk
Browse files

forward the parser error and error observer to the actual readers

parent c16f78d7
......@@ -18,6 +18,7 @@
#include "vtkCompositeDataSet.h"
#include "vtkDataArraySelection.h"
#include "vtkDataSet.h"
#include "vtkEventForwarderCommand.h"
#include "vtkHierarchicalBoxDataSet.h"
#include "vtkInformation.h"
#include "vtkInformationIntegerKey.h"
......@@ -25,6 +26,7 @@
#include "vtkInformationVector.h"
#include "vtkInstantiator.h"
#include "vtkMultiBlockDataSet.h"
#include "vtkNew.h"
#include "vtkObjectFactory.h"
#include "vtkSmartPointer.h"
#include "vtkUniformGrid.h"
......@@ -185,6 +187,16 @@ vtkXMLReader* vtkXMLCompositeDataReader::GetReaderOfType(const char* type)
}
if (reader)
{
if (this->GetParserErrorObserver())
{
reader->SetParserErrorObserver(this->GetParserErrorObserver());
}
if (this->HasObserver("ErrorEvent"))
{
vtkNew<vtkEventForwarderCommand> fwd;
fwd->SetTarget(this);
reader->AddObserver("ErrorEvent", fwd.GetPointer());
}
this->Internal->Readers[type] = reader;
reader->Delete();
}
......
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