Commit 609279bd authored by Cory Quammen's avatar Cory Quammen Committed by Kitware Robot

Merge topic 'xml_composite_reader_forward_observers'

e41e1e87 forward the parser error and error observer to the actual readers
Acked-by: Kitware Robot's avatarKitware Robot <kwrobot@kitware.com>
Merge-request: !1572
parents a00b89d9 e41e1e87
Pipeline #18621 pending with stage
......@@ -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();
}
......
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